Commit de996228 authored by Stanislav Fomichev's avatar Stanislav Fomichev Committed by Arnaldo Carvalho de Melo

perf timechart: Print pid along the name

Add PID to the figures of CPU usage timechart.
Signed-off-by: default avatarStanislav Fomichev <stfomichev@yandex-team.ru>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ramkumar Ramachandra <artagnon@gmail.com>
Link: http://lkml.kernel.org/r/1385995056-20158-3-git-send-email-stfomichev@yandex-team.ruSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 8b6dcca0
...@@ -841,6 +841,7 @@ static void draw_cpu_usage(struct timechart *tchart) ...@@ -841,6 +841,7 @@ static void draw_cpu_usage(struct timechart *tchart)
svg_process(sample->cpu, svg_process(sample->cpu,
sample->start_time, sample->start_time,
sample->end_time, sample->end_time,
p->pid,
"sample", "sample",
c->comm, c->comm,
sample->backtrace); sample->backtrace);
......
...@@ -285,7 +285,7 @@ void svg_cpu_box(int cpu, u64 __max_freq, u64 __turbo_freq) ...@@ -285,7 +285,7 @@ void svg_cpu_box(int cpu, u64 __max_freq, u64 __turbo_freq)
fprintf(svgfile, "</g>\n"); fprintf(svgfile, "</g>\n");
} }
void svg_process(int cpu, u64 start, u64 end, const char *type, const char *name, const char *backtrace) void svg_process(int cpu, u64 start, u64 end, int pid, const char *type, const char *name, const char *backtrace)
{ {
double width; double width;
...@@ -294,7 +294,7 @@ void svg_process(int cpu, u64 start, u64 end, const char *type, const char *name ...@@ -294,7 +294,7 @@ void svg_process(int cpu, u64 start, u64 end, const char *type, const char *name
fprintf(svgfile, "<g transform=\"translate(%4.8f,%4.8f)\">\n", time2pixels(start), cpu2y(cpu)); fprintf(svgfile, "<g transform=\"translate(%4.8f,%4.8f)\">\n", time2pixels(start), cpu2y(cpu));
fprintf(svgfile, "<title>%s %s</title>\n", name, time_to_string(end - start)); fprintf(svgfile, "<title>%d %s running %s</title>\n", pid, name, time_to_string(end - start));
if (backtrace) if (backtrace)
fprintf(svgfile, "<desc>Switched because:\n%s</desc>\n", backtrace); fprintf(svgfile, "<desc>Switched because:\n%s</desc>\n", backtrace);
fprintf(svgfile, "<rect x=\"0\" width=\"%4.8f\" y=\"0\" height=\"%4.1f\" class=\"%s\"/>\n", fprintf(svgfile, "<rect x=\"0\" width=\"%4.8f\" y=\"0\" height=\"%4.1f\" class=\"%s\"/>\n",
......
...@@ -11,7 +11,7 @@ extern void svg_waiting(int Yslot, int cpu, u64 start, u64 end, const char *back ...@@ -11,7 +11,7 @@ extern void svg_waiting(int Yslot, int cpu, u64 start, u64 end, const char *back
extern void svg_cpu_box(int cpu, u64 max_frequency, u64 turbo_frequency); extern void svg_cpu_box(int cpu, u64 max_frequency, u64 turbo_frequency);
extern void svg_process(int cpu, u64 start, u64 end, const char *type, const char *name, const char *backtrace); extern void svg_process(int cpu, u64 start, u64 end, int pid, const char *type, const char *name, const char *backtrace);
extern void svg_cstate(int cpu, u64 start, u64 end, int type); extern void svg_cstate(int cpu, u64 start, u64 end, int type);
extern void svg_pstate(int cpu, u64 start, u64 end, u64 freq); extern void svg_pstate(int cpu, u64 start, u64 end, u64 freq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment