mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 16:55:16 -04:00
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: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -704,7 +704,7 @@ static void __ui_browser__line_arrow_down(struct ui_browser *browser,
|
||||
ui_browser__gotorc(browser, row, column + 1);
|
||||
SLsmg_draw_hline(2);
|
||||
|
||||
if (row++ == 0)
|
||||
if (++row == 0)
|
||||
goto out;
|
||||
} else
|
||||
row = 0;
|
||||
|
||||
@@ -273,7 +273,7 @@ struct perf_evsel *perf_evsel__new_cycles(void)
|
||||
struct perf_event_attr attr = {
|
||||
.type = PERF_TYPE_HARDWARE,
|
||||
.config = PERF_COUNT_HW_CPU_CYCLES,
|
||||
.exclude_kernel = 1,
|
||||
.exclude_kernel = geteuid() != 0,
|
||||
};
|
||||
struct perf_evsel *evsel;
|
||||
|
||||
@@ -298,8 +298,10 @@ struct perf_evsel *perf_evsel__new_cycles(void)
|
||||
goto out;
|
||||
|
||||
/* use asprintf() because free(evsel) assumes name is allocated */
|
||||
if (asprintf(&evsel->name, "cycles%.*s",
|
||||
attr.precise_ip ? attr.precise_ip + 1 : 0, ":ppp") < 0)
|
||||
if (asprintf(&evsel->name, "cycles%s%s%.*s",
|
||||
(attr.precise_ip || attr.exclude_kernel) ? ":" : "",
|
||||
attr.exclude_kernel ? "u" : "",
|
||||
attr.precise_ip ? attr.precise_ip + 1 : 0, "ppp") < 0)
|
||||
goto error_free;
|
||||
out:
|
||||
return evsel;
|
||||
|
||||
Reference in New Issue
Block a user