builtin-timechart.c (58b9a18ecd251cbd6e666ad792023ab77c7d100e) builtin-timechart.c (c507999790438cde78b5618fa64daefd697035af)
1/*
2 * builtin-timechart.c - make an svg timechart of system activity
3 *
4 * (C) Copyright 2009 Intel Corporation
5 *
6 * Authors:
7 * Arjan van de Ven <arjan@linux.intel.com>
8 *

--- 44 unchanged lines hidden (view full) ---

53 int proc_num;
54 unsigned int numcpus;
55 u64 min_freq, /* Lowest CPU frequency seen */
56 max_freq, /* Highest CPU frequency seen */
57 turbo_frequency,
58 first_time, last_time;
59 bool power_only,
60 tasks_only,
1/*
2 * builtin-timechart.c - make an svg timechart of system activity
3 *
4 * (C) Copyright 2009 Intel Corporation
5 *
6 * Authors:
7 * Arjan van de Ven <arjan@linux.intel.com>
8 *

--- 44 unchanged lines hidden (view full) ---

53 int proc_num;
54 unsigned int numcpus;
55 u64 min_freq, /* Lowest CPU frequency seen */
56 max_freq, /* Highest CPU frequency seen */
57 turbo_frequency,
58 first_time, last_time;
59 bool power_only,
60 tasks_only,
61 with_backtrace;
61 with_backtrace,
62 topology;
62};
63
64struct per_pidcomm;
65struct cpu_sample;
66
67/*
68 * Datastructure layout:
69 * We keep an list of "pid"s, matching the kernels notion of a task struct.

--- 1002 unchanged lines hidden (view full) ---

1072 void *data)
1073{
1074 struct timechart *tchart = data;
1075
1076 switch (feat) {
1077 case HEADER_NRCPUS:
1078 tchart->numcpus = ph->env.nr_cpus_avail;
1079 break;
63};
64
65struct per_pidcomm;
66struct cpu_sample;
67
68/*
69 * Datastructure layout:
70 * We keep an list of "pid"s, matching the kernels notion of a task struct.

--- 1002 unchanged lines hidden (view full) ---

1073 void *data)
1074{
1075 struct timechart *tchart = data;
1076
1077 switch (feat) {
1078 case HEADER_NRCPUS:
1079 tchart->numcpus = ph->env.nr_cpus_avail;
1080 break;
1081
1082 case HEADER_CPU_TOPOLOGY:
1083 if (!tchart->topology)
1084 break;
1085
1086 if (svg_build_topology_map(ph->env.sibling_cores,
1087 ph->env.nr_sibling_cores,
1088 ph->env.sibling_threads,
1089 ph->env.nr_sibling_threads))
1090 fprintf(stderr, "problem building topology\n");
1091 break;
1092
1080 default:
1081 break;
1082 }
1083
1084 return 0;
1085}
1086
1087static int __cmd_timechart(struct timechart *tchart, const char *output_name)

--- 174 unchanged lines hidden (view full) ---

1262 "output processes data only"),
1263 OPT_CALLBACK('p', "process", NULL, "process",
1264 "process selector. Pass a pid or process name.",
1265 parse_process),
1266 OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory",
1267 "Look for files with symbols relative to this directory"),
1268 OPT_INTEGER('n', "proc-num", &tchart.proc_num,
1269 "min. number of tasks to print"),
1093 default:
1094 break;
1095 }
1096
1097 return 0;
1098}
1099
1100static int __cmd_timechart(struct timechart *tchart, const char *output_name)

--- 174 unchanged lines hidden (view full) ---

1275 "output processes data only"),
1276 OPT_CALLBACK('p', "process", NULL, "process",
1277 "process selector. Pass a pid or process name.",
1278 parse_process),
1279 OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory",
1280 "Look for files with symbols relative to this directory"),
1281 OPT_INTEGER('n', "proc-num", &tchart.proc_num,
1282 "min. number of tasks to print"),
1283 OPT_BOOLEAN('t', "topology", &tchart.topology,
1284 "sort CPUs according to topology"),
1270 OPT_END()
1271 };
1272 const char * const timechart_usage[] = {
1273 "perf timechart [<options>] {record}",
1274 NULL
1275 };
1276
1277 const struct option record_options[] = {

--- 37 unchanged lines hidden ---
1285 OPT_END()
1286 };
1287 const char * const timechart_usage[] = {
1288 "perf timechart [<options>] {record}",
1289 NULL
1290 };
1291
1292 const struct option record_options[] = {

--- 37 unchanged lines hidden ---