diff options
author | Igor Nabirushkin <inabirushkin@nvidia.com> | 2013-09-24 17:34:09 +0400 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2013-11-07 12:11:59 -0800 |
commit | ea3db32491e642e368a3d856b06798e6e1a2b498 (patch) | |
tree | be4cf06cb191544e926f1e4f69ab40e431c70e70 /drivers | |
parent | 1f15e805f697b97bdbf5225f9fcce07fe1058c29 (diff) |
misc: tegra-profiler: add thumb flag into samples
Tegra Profiler misc driver: thumb mode flag was
added into samples
Bug 1374335
Change-Id: If1a6b7e57071f6c9d645bc790e24cd1e3e405b6f
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/309637
(cherry picked from commit fb840196820effd627abe7779907db1e7db60101)
Reviewed-on: http://git-master/r/326020
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/tegra-profiler/debug.c | 2 | ||||
-rw-r--r-- | drivers/misc/tegra-profiler/hrt.c | 7 | ||||
-rw-r--r-- | drivers/misc/tegra-profiler/tegra.h | 8 | ||||
-rw-r--r-- | drivers/misc/tegra-profiler/version.h | 2 |
4 files changed, 11 insertions, 8 deletions
diff --git a/drivers/misc/tegra-profiler/debug.c b/drivers/misc/tegra-profiler/debug.c index e0270a310ae4..fbe95b52f473 100644 --- a/drivers/misc/tegra-profiler/debug.c +++ b/drivers/misc/tegra-profiler/debug.c @@ -42,7 +42,7 @@ init_sample(struct quadd_record_data *record, struct pt_regs *regs) record->cpu_mode = user_mode(regs) ? QUADD_CPU_MODE_USER : QUADD_CPU_MODE_KERNEL; - s->cpu = quadd_get_processor_id(); + s->cpu = quadd_get_processor_id(regs); s->pid = 0; s->time = quadd_get_time(); s->timer_period = 0; diff --git a/drivers/misc/tegra-profiler/hrt.c b/drivers/misc/tegra-profiler/hrt.c index f0a8b277b5f7..0066f3af5520 100644 --- a/drivers/misc/tegra-profiler/hrt.c +++ b/drivers/misc/tegra-profiler/hrt.c @@ -203,7 +203,7 @@ static int get_sample_data(struct event_data *event, sample->event_id = event->event_id; sample->ip = instruction_pointer(regs); - sample->cpu = quadd_get_processor_id(); + sample->cpu = quadd_get_processor_id(regs); sample->time = get_sample_time(); if (prev_val <= val) @@ -388,7 +388,7 @@ void __quadd_task_sched_in(struct task_struct *prev, /* if (__ratelimit(&ratelimit_state)) pr_info("sch_in, cpu: %d, prev: %u (%u) \t--> curr: %u (%u)\n", - quadd_get_processor_id(), (unsigned int)prev->pid, + smp_processor_id(), (unsigned int)prev->pid, (unsigned int)prev->tgid, (unsigned int)task->pid, (unsigned int)task->tgid); */ @@ -424,11 +424,10 @@ void __quadd_task_sched_out(struct task_struct *prev, /* if (__ratelimit(&ratelimit_state)) pr_info("sch_out: cpu: %d, prev: %u (%u) \t--> next: %u (%u)\n", - quadd_get_processor_id(), (unsigned int)prev->pid, + smp_processor_id(), (unsigned int)prev->pid, (unsigned int)prev->tgid, (unsigned int)next->pid, (unsigned int)next->tgid); */ - prev_flag = is_profile_process(prev->tgid); if (prev_flag) { diff --git a/drivers/misc/tegra-profiler/tegra.h b/drivers/misc/tegra-profiler/tegra.h index 013c5abd644f..65cd6cd0e142 100644 --- a/drivers/misc/tegra-profiler/tegra.h +++ b/drivers/misc/tegra-profiler/tegra.h @@ -18,21 +18,25 @@ #define __QUADD_TEGRA_H #include <linux/smp.h> +#include <asm/ptrace.h> #ifdef CONFIG_TEGRA_CLUSTER_CONTROL #include <linux/io.h> #include <../../mach-tegra/pm.h> #endif -static inline int quadd_get_processor_id(void) +static inline int quadd_get_processor_id(struct pt_regs *regs) { int cpu_id = smp_processor_id(); #ifdef CONFIG_TEGRA_CLUSTER_CONTROL if (is_lp_cluster()) - cpu_id |= QM_TEGRA_POWER_CLUSTER_LP; + cpu_id |= QUADD_CPUMODE_TEGRA_POWER_CLUSTER_LP; #endif + if (thumb_mode(regs)) + cpu_id |= QUADD_CPUMODE_THUMB; + return cpu_id; } diff --git a/drivers/misc/tegra-profiler/version.h b/drivers/misc/tegra-profiler/version.h index 91fade52fa57..6b0f795bb60c 100644 --- a/drivers/misc/tegra-profiler/version.h +++ b/drivers/misc/tegra-profiler/version.h @@ -18,7 +18,7 @@ #ifndef __QUADD_VERSION_H #define __QUADD_VERSION_H -#define QUADD_MODULE_VERSION "1.33" +#define QUADD_MODULE_VERSION "1.34" #define QUADD_MODULE_BRANCH "Dev" #endif /* __QUADD_VERSION_H */ |