perf script: Unify the expressions indicating "unknown"
The perf script command uses various expressions to indicate "unknown". It is unfriendly for user scripts to parse it. So, this patch unifies the expressions to "[unknown]". Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: yrl.pp-manager.tt@hitachi.com Link: http://lkml.kernel.org/r/20120130044257.2384.62905.stgit@linux3 Signed-off-by: Akihiro Nagai <akihiro.nagai.hw@hitachi.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
f9d3699656
commit
547a92e0ae
@@ -263,6 +263,18 @@ static size_t symbol__fprintf(struct symbol *sym, FILE *fp)
|
||||
sym->name);
|
||||
}
|
||||
|
||||
size_t symbol__fprintf_symname(const struct symbol *sym, FILE *fp)
|
||||
{
|
||||
const char *symname;
|
||||
|
||||
if (sym && sym->name)
|
||||
symname = sym->name;
|
||||
else
|
||||
symname = "[unknown]";
|
||||
|
||||
return fprintf(fp, "%s", symname);
|
||||
}
|
||||
|
||||
void dso__set_long_name(struct dso *dso, char *name)
|
||||
{
|
||||
if (name == NULL)
|
||||
|
||||
Reference in New Issue
Block a user