projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'powerpc-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux-2.6-microblaze.git]
/
tools
/
perf
/
builtin-script.c
diff --git
a/tools/perf/builtin-script.c
b/tools/perf/builtin-script.c
index
484ce60
..
48588cc
100644
(file)
--- a/
tools/perf/builtin-script.c
+++ b/
tools/perf/builtin-script.c
@@
-702,12
+702,14
@@
static int perf_sample__fprintf_start(struct perf_script *script,
char tstr[128];
if (PRINT_FIELD(COMM)) {
char tstr[128];
if (PRINT_FIELD(COMM)) {
+ const char *comm = thread ? thread__comm_str(thread) : ":-1";
+
if (latency_format)
if (latency_format)
- printed += fprintf(fp, "%8.8s ",
thread__comm_str(thread)
);
+ printed += fprintf(fp, "%8.8s ",
comm
);
else if (PRINT_FIELD(IP) && evsel__has_callchain(evsel) && symbol_conf.use_callchain)
else if (PRINT_FIELD(IP) && evsel__has_callchain(evsel) && symbol_conf.use_callchain)
- printed += fprintf(fp, "%s ",
thread__comm_str(thread)
);
+ printed += fprintf(fp, "%s ",
comm
);
else
else
- printed += fprintf(fp, "%16s ",
thread__comm_str(thread)
);
+ printed += fprintf(fp, "%16s ",
comm
);
}
if (PRINT_FIELD(PID) && PRINT_FIELD(TID))
}
if (PRINT_FIELD(PID) && PRINT_FIELD(TID))
@@
-2238,7
+2240,7
@@
static int print_event_with_time(struct perf_tool *tool,
if (tid != -1)
thread = machine__findnew_thread(machine, pid, tid);
if (tid != -1)
thread = machine__findnew_thread(machine, pid, tid);
- if (
thread &&
evsel) {
+ if (evsel) {
perf_sample__fprintf_start(script, sample, thread, evsel,
event->header.type, stdout);
}
perf_sample__fprintf_start(script, sample, thread, evsel,
event->header.type, stdout);
}