summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIgor Nabirushkin <inabirushkin@nvidia.com>2013-09-08 10:43:36 +0400
committerRiham Haidar <rhaidar@nvidia.com>2013-09-19 13:00:19 -0700
commitb02d2badfa862bd02e346efd0cd286a452b08167 (patch)
treede9599e19f9916e1b40bccabf59fdeea19efe4e2 /drivers
parent530f877ff879a663eddd25c81883880bcd2b8c48 (diff)
misc: tegra-profiler: remove excess callchains
Tegra Profiler: improve performance by removing unnecessary callchains Bug 1364258 Change-Id: Ib2b196660fbaecb9d11af65102145727aa22d110 Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com> Reviewed-on: http://git-master/r/272093 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/hrt.c21
-rw-r--r--drivers/misc/tegra-profiler/version.h2
2 files changed, 13 insertions, 10 deletions
diff --git a/drivers/misc/tegra-profiler/hrt.c b/drivers/misc/tegra-profiler/hrt.c
index 6a9c39ffd05c..fdfbb96f5910 100644
--- a/drivers/misc/tegra-profiler/hrt.c
+++ b/drivers/misc/tegra-profiler/hrt.c
@@ -253,6 +253,9 @@ static void read_source(struct quadd_event_source_interface *source,
return;
}
+ if (atomic_read(&cpu_ctx->nr_active) == 0)
+ return;
+
if (user_mode(regs) && hrt.quadd_ctx->param.backtrace) {
callchain_nr = quadd_get_user_callchain(regs, callchain_data);
if (callchain_nr > 0) {
@@ -275,20 +278,20 @@ static void read_source(struct quadd_event_source_interface *source,
!quadd_ctx->collect_kernel_ips)
record_data.sample.ip = 0;
- record_data.sample.callchain_nr = callchain_nr;
-
if (pid > 0) {
record_data.sample.pid = pid;
- quadd_put_sample(&record_data, extra_data,
- extra_length);
} else {
t_data = &cpu_ctx->active_thread;
+ record_data.sample.pid = t_data->pid;
+ }
- if (atomic_read(&cpu_ctx->nr_active) > 0) {
- record_data.sample.pid = t_data->pid;
- quadd_put_sample(&record_data, extra_data,
- extra_length);
- }
+ if (i == 0) {
+ record_data.sample.callchain_nr = callchain_nr;
+ quadd_put_sample(&record_data, extra_data,
+ extra_length);
+ } else {
+ record_data.sample.callchain_nr = 0;
+ quadd_put_sample(&record_data, NULL, 0);
}
}
}
diff --git a/drivers/misc/tegra-profiler/version.h b/drivers/misc/tegra-profiler/version.h
index 838c1f4d56f4..3c03b2978711 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.29"
+#define QUADD_MODULE_VERSION "1.30"
#define QUADD_MODULE_BRANCH "Dev"
#endif /* __QUADD_VERSION_H */