Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252666
b: refs/heads/master
c: e4a338d
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed May 27, 2011
1 parent e8b942a commit a64f415
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f6f55809758e106eca72c6e01402c8080a88ee8
refs/heads/master: e4a338d05df93ab1ebf291aca1e753064319d301
20 changes: 15 additions & 5 deletions trunk/tools/perf/builtin-top.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ static bool use_tui, use_stdio;
static int default_interval = 0;

static bool kptr_restrict_warned;
static bool vmlinux_warned;
static bool inherit = false;
static int realtime_prio = 0;
static bool group = false;
Expand Down Expand Up @@ -754,6 +755,7 @@ static void perf_event__process_sample(const union perf_event *event,
}

if (al.sym == NULL) {
const char *msg = "Kernel samples will not be resolved.\n";
/*
* As we do lazy loading of symtabs we only will know if the
* specified vmlinux file is invalid when we actually have a
Expand All @@ -765,12 +767,20 @@ static void perf_event__process_sample(const union perf_event *event,
* --hide-kernel-symbols, even if the user specifies an
* invalid --vmlinux ;-)
*/
if (al.map == machine->vmlinux_maps[MAP__FUNCTION] &&
if (!kptr_restrict_warned && !vmlinux_warned &&
al.map == machine->vmlinux_maps[MAP__FUNCTION] &&
RB_EMPTY_ROOT(&al.map->dso->symbols[MAP__FUNCTION])) {
ui__warning("The %s file can't be used\n",
symbol_conf.vmlinux_name);
exit_browser(0);
exit(1);
if (symbol_conf.vmlinux_name) {
ui__warning("The %s file can't be used.\n%s",
symbol_conf.vmlinux_name, msg);
} else {
ui__warning("A vmlinux file was not found.\n%s",
msg);
}

if (use_browser <= 0)
sleep(5);
vmlinux_warned = true;
}

return;
Expand Down

0 comments on commit a64f415

Please sign in to comment.