Commit 1922eec4 authored by Ingo Molnar's avatar Ingo Molnar

Merge tag 'perf-urgent-for-mingo-4.13-20170710' of...

Merge tag 'perf-urgent-for-mingo-4.13-20170710' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

 - Fix attr.exclude_kernel setting for default cycles:p (Arnaldo Carvalho de Melo)

 - Fix broken arrow at row 0 connecting jmp instruction to its target in
   the annotate TUI (Jin Yao)
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents dbf58062 80f62589
...@@ -704,7 +704,7 @@ static void __ui_browser__line_arrow_down(struct ui_browser *browser, ...@@ -704,7 +704,7 @@ static void __ui_browser__line_arrow_down(struct ui_browser *browser,
ui_browser__gotorc(browser, row, column + 1); ui_browser__gotorc(browser, row, column + 1);
SLsmg_draw_hline(2); SLsmg_draw_hline(2);
if (row++ == 0) if (++row == 0)
goto out; goto out;
} else } else
row = 0; row = 0;
......
...@@ -273,7 +273,7 @@ struct perf_evsel *perf_evsel__new_cycles(void) ...@@ -273,7 +273,7 @@ struct perf_evsel *perf_evsel__new_cycles(void)
struct perf_event_attr attr = { struct perf_event_attr attr = {
.type = PERF_TYPE_HARDWARE, .type = PERF_TYPE_HARDWARE,
.config = PERF_COUNT_HW_CPU_CYCLES, .config = PERF_COUNT_HW_CPU_CYCLES,
.exclude_kernel = 1, .exclude_kernel = geteuid() != 0,
}; };
struct perf_evsel *evsel; struct perf_evsel *evsel;
...@@ -298,8 +298,10 @@ struct perf_evsel *perf_evsel__new_cycles(void) ...@@ -298,8 +298,10 @@ struct perf_evsel *perf_evsel__new_cycles(void)
goto out; goto out;
/* use asprintf() because free(evsel) assumes name is allocated */ /* use asprintf() because free(evsel) assumes name is allocated */
if (asprintf(&evsel->name, "cycles%.*s", if (asprintf(&evsel->name, "cycles%s%s%.*s",
attr.precise_ip ? attr.precise_ip + 1 : 0, ":ppp") < 0) (attr.precise_ip || attr.exclude_kernel) ? ":" : "",
attr.exclude_kernel ? "u" : "",
attr.precise_ip ? attr.precise_ip + 1 : 0, "ppp") < 0)
goto error_free; goto error_free;
out: out:
return evsel; return evsel;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment