summaryrefslogtreecommitdiff
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-03-31 09:27:41 +0200
committerIngo Molnar <mingo@kernel.org>2012-03-31 09:27:41 +0200
commit8ebfdf2babcda5a3b06cc67523bca1f9aed46009 (patch)
tree160fe42903b8fdd399347ae9e7a7d72c331570f8 /tools/perf/util/symbol.c
parent12b5da349a8b94c9dbc3430a6bc42eabd9eaf50b (diff)
parent65f3e56e0c81d1f581c4bdef7646ae5a8d51f494 (diff)
Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r--tools/perf/util/symbol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 5dd83c3e2c0c..c0a028c3ebaf 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1,6 +1,5 @@
#include <dirent.h>
#include <errno.h>
-#include <libgen.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -51,6 +50,8 @@ struct symbol_conf symbol_conf = {
int dso__name_len(const struct dso *dso)
{
+ if (!dso)
+ return strlen("[unknown]");
if (verbose)
return dso->long_name_len;