From 80461998ac54af5e0d4eb151886a4453e5f88826 Mon Sep 17 00:00:00 2001 From: Jiyu Yang Date: Thu, 23 Feb 2017 18:35:03 +0800 Subject: [PATCH] PD#138881 disable state tracing when release Change-Id: Id2dd5a708f7b7f34ab5131053cacb98b5e8c0d6d --- mali/Kbuild | 4 ++++ mali/common/mali_executor.c | 4 ++++ utgard/r5p1/Kbuild | 4 ++++ utgard/r6p1/Kbuild | 4 ++++ utgard/r6p1/common/mali_executor.c | 4 ++++ utgard/r6p2/Kbuild | 4 ++++ utgard/r6p2/common/mali_executor.c | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/mali/Kbuild b/mali/Kbuild index 06b2541..4692a7a 100755 --- a/mali/Kbuild +++ b/mali/Kbuild @@ -264,7 +264,11 @@ ccflags-y += $(EXTRA_DEFINES) ccflags-y += -DMALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP=$(MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP) ccflags-y += -DMALI_PP_SCHEDULER_KEEP_SUB_JOB_STARTS_ALIGNED=$(MALI_PP_SCHEDULER_KEEP_SUB_JOB_STARTS_ALIGNED) ccflags-y += -DMALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP_BETWEEN_APPS=$(MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP_BETWEEN_APPS) +ifdef CONFIG_MALI400_DEBUG ccflags-y += -DMALI_STATE_TRACKING=1 +else +ccflags-y += -DMALI_STATE_TRACKING=0 +endif ccflags-y += -DMALI_OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=$(OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB) ccflags-y += -DUSING_GPU_UTILIZATION=$(USING_GPU_UTILIZATION) ccflags-y += -DMALI_ENABLE_CPU_CYCLES=$(MALI_ENABLE_CPU_CYCLES) diff --git a/mali/common/mali_executor.c b/mali/common/mali_executor.c index 68f9003..3658e1c 100755 --- a/mali/common/mali_executor.c +++ b/mali/common/mali_executor.c @@ -2651,6 +2651,7 @@ void mali_executor_running_status_print(void) MALI_PRINT(("\tchild group(%s) running job: %p\n", group->pp_core->hw_core.description, group->pp_running_job)); MALI_PRINT(("\tchild group(%s)->status: %d\n", group->pp_core->hw_core.description, group->state)); MALI_PRINT(("\tchild group(%s) SW power: %s\n", group->pp_core->hw_core.description, group->power_is_on ? "On" : "Off")); +#if MALI_STATE_TRACKING if (group->pm_domain) { MALI_PRINT(("\tPower domain: id %u\n", mali_pm_domain_get_id(group->pm_domain))); MALI_PRINT(("\tMask:0x%04x \n", mali_pm_domain_get_mask(group->pm_domain))); @@ -2658,12 +2659,14 @@ void mali_executor_running_status_print(void) MALI_PRINT(("\tCurrent power status:%s \n", (mali_pm_domain_get_mask(group->pm_domain)& mali_pm_get_current_mask()) ? "On" : "Off")); MALI_PRINT(("\tWanted power status:%s \n", (mali_pm_domain_get_mask(group->pm_domain)& mali_pm_get_wanted_mask()) ? "On" : "Off")); } +#endif for (i = 0; i < 2; i++) { if (NULL != group->l2_cache_core[i]) { struct mali_pm_domain *domain; domain = mali_l2_cache_get_pm_domain(group->l2_cache_core[i]); MALI_PRINT(("\t L2(index %d) group SW power: %s\n", i, group->l2_cache_core[i]->power_is_on ? "On" : "Off")); +#if MALI_STATE_TRACKING if (domain) { MALI_PRINT(("\tL2 Power domain: id %u\n", mali_pm_domain_get_id(domain))); MALI_PRINT(("\tL2 Mask:0x%04x \n", mali_pm_domain_get_mask(domain))); @@ -2671,6 +2674,7 @@ void mali_executor_running_status_print(void) MALI_PRINT(("\tL2 Current power status:%s \n", (mali_pm_domain_get_mask(domain) & mali_pm_get_current_mask()) ? "On" : "Off")); MALI_PRINT(("\tL2 Wanted power status:%s \n", (mali_pm_domain_get_mask(domain) & mali_pm_get_wanted_mask()) ? "On" : "Off")); } +#endif } } } diff --git a/utgard/r5p1/Kbuild b/utgard/r5p1/Kbuild index c1877a2..5e19254 100755 --- a/utgard/r5p1/Kbuild +++ b/utgard/r5p1/Kbuild @@ -236,7 +236,11 @@ ccflags-y += $(EXTRA_DEFINES) ccflags-y += -DMALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP=$(MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP) ccflags-y += -DMALI_PP_SCHEDULER_KEEP_SUB_JOB_STARTS_ALIGNED=$(MALI_PP_SCHEDULER_KEEP_SUB_JOB_STARTS_ALIGNED) ccflags-y += -DMALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP_BETWEEN_APPS=$(MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP_BETWEEN_APPS) +ifdef CONFIG_MALI400_DEBUG ccflags-y += -DMALI_STATE_TRACKING=1 +else +ccflags-y += -DMALI_STATE_TRACKING=0 +endif ccflags-y += -DMALI_OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=$(OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB) ccflags-y += -DUSING_GPU_UTILIZATION=$(USING_GPU_UTILIZATION) ccflags-y += -DMALI_ENABLE_CPU_CYCLES=$(MALI_ENABLE_CPU_CYCLES) diff --git a/utgard/r6p1/Kbuild b/utgard/r6p1/Kbuild index a46e699..1b20447 100755 --- a/utgard/r6p1/Kbuild +++ b/utgard/r6p1/Kbuild @@ -263,7 +263,11 @@ ccflags-y += $(EXTRA_DEFINES) ccflags-y += -DMALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP=$(MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP) ccflags-y += -DMALI_PP_SCHEDULER_KEEP_SUB_JOB_STARTS_ALIGNED=$(MALI_PP_SCHEDULER_KEEP_SUB_JOB_STARTS_ALIGNED) ccflags-y += -DMALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP_BETWEEN_APPS=$(MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP_BETWEEN_APPS) +ifdef CONFIG_MALI400_DEBUG ccflags-y += -DMALI_STATE_TRACKING=1 +else +ccflags-y += -DMALI_STATE_TRACKING=0 +endif ccflags-y += -DMALI_OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=$(OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB) ccflags-y += -DUSING_GPU_UTILIZATION=$(USING_GPU_UTILIZATION) ccflags-y += -DMALI_ENABLE_CPU_CYCLES=$(MALI_ENABLE_CPU_CYCLES) diff --git a/utgard/r6p1/common/mali_executor.c b/utgard/r6p1/common/mali_executor.c index 550f411..76bf701 100755 --- a/utgard/r6p1/common/mali_executor.c +++ b/utgard/r6p1/common/mali_executor.c @@ -2646,6 +2646,7 @@ void mali_executor_running_status_print(void) MALI_PRINT(("\tchild group(%s) running job: %p\n", group->pp_core->hw_core.description, group->pp_running_job)); MALI_PRINT(("\tchild group(%s)->status: %d\n", group->pp_core->hw_core.description, group->state)); MALI_PRINT(("\tchild group(%s) SW power: %s\n", group->pp_core->hw_core.description, group->power_is_on ? "On" : "Off")); +#if MALI_STATE_TRACKING if (group->pm_domain) { MALI_PRINT(("\tPower domain: id %u\n", mali_pm_domain_get_id(group->pm_domain))); MALI_PRINT(("\tMask:0x%04x \n", mali_pm_domain_get_mask(group->pm_domain))); @@ -2653,12 +2654,14 @@ void mali_executor_running_status_print(void) MALI_PRINT(("\tCurrent power status:%s \n", (mali_pm_domain_get_mask(group->pm_domain)& mali_pm_get_current_mask()) ? "On" : "Off")); MALI_PRINT(("\tWanted power status:%s \n", (mali_pm_domain_get_mask(group->pm_domain)& mali_pm_get_wanted_mask()) ? "On" : "Off")); } +#endif for (i = 0; i < 2; i++) { if (NULL != group->l2_cache_core[i]) { struct mali_pm_domain *domain; domain = mali_l2_cache_get_pm_domain(group->l2_cache_core[i]); MALI_PRINT(("\t L2(index %d) group SW power: %s\n", i, group->l2_cache_core[i]->power_is_on ? "On" : "Off")); +#if MALI_STATE_TRACKING if (domain) { MALI_PRINT(("\tL2 Power domain: id %u\n", mali_pm_domain_get_id(domain))); MALI_PRINT(("\tL2 Mask:0x%04x \n", mali_pm_domain_get_mask(domain))); @@ -2666,6 +2669,7 @@ void mali_executor_running_status_print(void) MALI_PRINT(("\tL2 Current power status:%s \n", (mali_pm_domain_get_mask(domain) & mali_pm_get_current_mask()) ? "On" : "Off")); MALI_PRINT(("\tL2 Wanted power status:%s \n", (mali_pm_domain_get_mask(domain) & mali_pm_get_wanted_mask()) ? "On" : "Off")); } +#endif } } } diff --git a/utgard/r6p2/Kbuild b/utgard/r6p2/Kbuild index 0a571c7..aa207c2 100755 --- a/utgard/r6p2/Kbuild +++ b/utgard/r6p2/Kbuild @@ -264,7 +264,11 @@ ccflags-y += $(EXTRA_DEFINES) ccflags-y += -DMALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP=$(MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP) ccflags-y += -DMALI_PP_SCHEDULER_KEEP_SUB_JOB_STARTS_ALIGNED=$(MALI_PP_SCHEDULER_KEEP_SUB_JOB_STARTS_ALIGNED) ccflags-y += -DMALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP_BETWEEN_APPS=$(MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP_BETWEEN_APPS) +ifdef CONFIG_MALI400_DEBUG ccflags-y += -DMALI_STATE_TRACKING=1 +else +ccflags-y += -DMALI_STATE_TRACKING=0 +endif ccflags-y += -DMALI_OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=$(OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB) ccflags-y += -DUSING_GPU_UTILIZATION=$(USING_GPU_UTILIZATION) ccflags-y += -DMALI_ENABLE_CPU_CYCLES=$(MALI_ENABLE_CPU_CYCLES) diff --git a/utgard/r6p2/common/mali_executor.c b/utgard/r6p2/common/mali_executor.c index 275c061..f17e443 100755 --- a/utgard/r6p2/common/mali_executor.c +++ b/utgard/r6p2/common/mali_executor.c @@ -2652,6 +2652,7 @@ void mali_executor_running_status_print(void) MALI_PRINT(("\tchild group(%s) running job: %p\n", group->pp_core->hw_core.description, group->pp_running_job)); MALI_PRINT(("\tchild group(%s)->status: %d\n", group->pp_core->hw_core.description, group->state)); MALI_PRINT(("\tchild group(%s) SW power: %s\n", group->pp_core->hw_core.description, group->power_is_on ? "On" : "Off")); +#if MALI_STATE_TRACKING if (group->pm_domain) { MALI_PRINT(("\tPower domain: id %u\n", mali_pm_domain_get_id(group->pm_domain))); MALI_PRINT(("\tMask:0x%04x \n", mali_pm_domain_get_mask(group->pm_domain))); @@ -2659,12 +2660,14 @@ void mali_executor_running_status_print(void) MALI_PRINT(("\tCurrent power status:%s \n", (mali_pm_domain_get_mask(group->pm_domain)& mali_pm_get_current_mask()) ? "On" : "Off")); MALI_PRINT(("\tWanted power status:%s \n", (mali_pm_domain_get_mask(group->pm_domain)& mali_pm_get_wanted_mask()) ? "On" : "Off")); } +#endif for (i = 0; i < 2; i++) { if (NULL != group->l2_cache_core[i]) { struct mali_pm_domain *domain; domain = mali_l2_cache_get_pm_domain(group->l2_cache_core[i]); MALI_PRINT(("\t L2(index %d) group SW power: %s\n", i, group->l2_cache_core[i]->power_is_on ? "On" : "Off")); +#if MALI_STATE_TRACKING if (domain) { MALI_PRINT(("\tL2 Power domain: id %u\n", mali_pm_domain_get_id(domain))); MALI_PRINT(("\tL2 Mask:0x%04x \n", mali_pm_domain_get_mask(domain))); @@ -2672,6 +2675,7 @@ void mali_executor_running_status_print(void) MALI_PRINT(("\tL2 Current power status:%s \n", (mali_pm_domain_get_mask(domain) & mali_pm_get_current_mask()) ? "On" : "Off")); MALI_PRINT(("\tL2 Wanted power status:%s \n", (mali_pm_domain_get_mask(domain) & mali_pm_get_wanted_mask()) ? "On" : "Off")); } +#endif } } } -- 2.20.1