]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.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)
committerDhiren Parmar <dparmar@nvidia.com>
Tue, 12 Aug 2014 12:48:46 +0000 (05:48 -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
(cherry picked from commit b4f84b60177750214ddac24c63c2f9a08b15ce05)
Reviewed-on: http://git-master/r/454469
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
drivers/misc/tegra-profiler/hrt.c
drivers/misc/tegra-profiler/main.c
drivers/misc/tegra-profiler/version.h

index 2d7b1a9d6d6bfcac86bf3fd954de80e4478afcdf..6a47de93b3e2e4e8597e275dbd0d6f5cb0462902 100644 (file)
@@ -338,9 +338,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++;
@@ -376,6 +373,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 0f364d773084bbfb834eff3014af0730888934b1..7a1f5c7b99739ae23c51061ceda1e5f9fec7527b 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 */