]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commitdiff
misc: tegra-profiler: fix backtraces for 64-bit
authorIgor Nabirushkin <inabirushkin@nvidia.com>
Tue, 24 Jun 2014 13:07:53 +0000 (17:07 +0400)
committerDan Willemsen <dwillemsen@nvidia.com>
Wed, 18 Mar 2015 19:00:06 +0000 (12:00 -0700)
* Fix backtraces for 64-bit programs
* Also, allow user to use any frequency in range [100 Hz; 100 kHz]

Bug 1527404

Change-Id: I29495ddd1449e59b354ac00d4112bdf7b9845375
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/427738
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/misc/tegra-profiler/hrt.c
drivers/misc/tegra-profiler/main.c
drivers/misc/tegra-profiler/version.h

index 0a1da9145c11f379dfccc9234f2ae329e47c4f7f..fc12c444cbd7287c1d91fe1f5d5d89468f37f1ec 100644 (file)
@@ -334,9 +334,6 @@ read_all_sources(struct pt_regs *regs, struct task_struct *task)
        if (get_sample_data(s, regs, task))
                return;
 
-       if (cc->cs_64)
-               extra_data |= QUADD_SED_IP64;
-
        vec[vec_idx].base = &extra_data;
        vec[vec_idx].len = sizeof(extra_data);
        vec_idx++;
@@ -372,6 +369,9 @@ read_all_sources(struct pt_regs *regs, struct task_struct *task)
                        vec[vec_idx].base = cc->types;
                        vec[vec_idx].len = nr_types * sizeof(cc->types[0]);
                        vec_idx++;
+
+                       if (cc->cs_64)
+                               extra_data |= QUADD_SED_IP64;
                }
 
                extra_data |= cc->unw_method << QUADD_SED_UNW_METHOD_SHIFT;
index 64bad4a33c011c08ae57cbe3e0cedc1228b6e515..5d4b11ed08685dcd36b7e1715d754473904dea44 100644 (file)
@@ -161,10 +161,7 @@ static inline int is_event_supported(struct source_info *si, int event)
 static int
 validate_freq(unsigned int freq)
 {
-       if (capable(CAP_SYS_ADMIN))
-               return freq >= 100 && freq <= 100000;
-       else
-               return freq == 100 || freq == 1000 || freq == 10000;
+       return freq >= 100 && freq <= 100000;
 }
 
 static int
index 96299d576c4c39278842bf6492d3abd4f2b7283e..5daedf7de3a089e682379a9312aaeda1f5800f1b 100644 (file)
@@ -18,7 +18,7 @@
 #ifndef __QUADD_VERSION_H
 #define __QUADD_VERSION_H
 
-#define QUADD_MODULE_VERSION           "1.76"
+#define QUADD_MODULE_VERSION           "1.77"
 #define QUADD_MODULE_BRANCH            "Dev"
 
 #endif /* __QUADD_VERSION_H */