aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-timechart.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-timechart.c')
-rw-r--r--tools/perf/builtin-timechart.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 0801275c500e..67c0459dc325 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -264,9 +264,6 @@ pid_put_sample(int pid, int type, unsigned int cpu, u64 start, u64 end)
264 c->start_time = start; 264 c->start_time = start;
265 if (p->start_time == 0 || p->start_time > start) 265 if (p->start_time == 0 || p->start_time > start)
266 p->start_time = start; 266 p->start_time = start;
267
268 if (cpu > numcpus)
269 numcpus = cpu;
270} 267}
271 268
272#define MAX_CPUS 4096 269#define MAX_CPUS 4096
@@ -514,6 +511,9 @@ static int process_sample_event(union perf_event *event __used,
514 if (!event_str) 511 if (!event_str)
515 return 0; 512 return 0;
516 513
514 if (sample->cpu > numcpus)
515 numcpus = sample->cpu;
516
517 if (strcmp(event_str, "power:cpu_idle") == 0) { 517 if (strcmp(event_str, "power:cpu_idle") == 0) {
518 struct power_processor_entry *ppe = (void *)te; 518 struct power_processor_entry *ppe = (void *)te;
519 if (ppe->state == (u32)PWR_EVENT_EXIT) 519 if (ppe->state == (u32)PWR_EVENT_EXIT)