aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-14 16:33:39 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-14 16:33:39 -0400
commitf75f6ff2eaa626d32dd3225e3008f807741ad1c5 (patch)
tree91446916eff11bc8b900ca4a4a67561021354e53 /tools/perf
parentc92316bf8e94830a0225f2e904cbdbd173768419 (diff)
parentef954844c7ace62f773f4f23e28d2d915adc419f (diff)
Merge 4.13-rc5 into driver-core-next
We want the fixes in here as well for testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/ui/browser.c2
-rw-r--r--tools/perf/util/evsel.c8
-rw-r--r--tools/perf/util/machine.c2
3 files changed, 7 insertions, 5 deletions
diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c
index a4d3762cd825..83874b0e266c 100644
--- a/tools/perf/ui/browser.c
+++ b/tools/perf/ui/browser.c
@@ -704,7 +704,7 @@ static void __ui_browser__line_arrow_down(struct ui_browser *browser,
704 ui_browser__gotorc(browser, row, column + 1); 704 ui_browser__gotorc(browser, row, column + 1);
705 SLsmg_draw_hline(2); 705 SLsmg_draw_hline(2);
706 706
707 if (row++ == 0) 707 if (++row == 0)
708 goto out; 708 goto out;
709 } else 709 } else
710 row = 0; 710 row = 0;
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 87b431886670..413f74df08de 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -273,7 +273,7 @@ struct perf_evsel *perf_evsel__new_cycles(void)
273 struct perf_event_attr attr = { 273 struct perf_event_attr attr = {
274 .type = PERF_TYPE_HARDWARE, 274 .type = PERF_TYPE_HARDWARE,
275 .config = PERF_COUNT_HW_CPU_CYCLES, 275 .config = PERF_COUNT_HW_CPU_CYCLES,
276 .exclude_kernel = 1, 276 .exclude_kernel = geteuid() != 0,
277 }; 277 };
278 struct perf_evsel *evsel; 278 struct perf_evsel *evsel;
279 279
@@ -298,8 +298,10 @@ struct perf_evsel *perf_evsel__new_cycles(void)
298 goto out; 298 goto out;
299 299
300 /* use asprintf() because free(evsel) assumes name is allocated */ 300 /* use asprintf() because free(evsel) assumes name is allocated */
301 if (asprintf(&evsel->name, "cycles%.*s", 301 if (asprintf(&evsel->name, "cycles%s%s%.*s",
302 attr.precise_ip ? attr.precise_ip + 1 : 0, ":ppp") < 0) 302 (attr.precise_ip || attr.exclude_kernel) ? ":" : "",
303 attr.exclude_kernel ? "u" : "",
304 attr.precise_ip ? attr.precise_ip + 1 : 0, "ppp") < 0)
303 goto error_free; 305 goto error_free;
304out: 306out:
305 return evsel; 307 return evsel;
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 5de2b86b9880..2e9eb6aa3ce2 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -2209,7 +2209,7 @@ int machine__get_kernel_start(struct machine *machine)
2209 machine->kernel_start = 1ULL << 63; 2209 machine->kernel_start = 1ULL << 63;
2210 if (map) { 2210 if (map) {
2211 err = map__load(map); 2211 err = map__load(map);
2212 if (map->start) 2212 if (!err)
2213 machine->kernel_start = map->start; 2213 machine->kernel_start = map->start;
2214 } 2214 }
2215 return err; 2215 return err;