tchart            199 tools/perf/builtin-timechart.c static struct per_pid *find_create_pid(struct timechart *tchart, int pid)
tchart            201 tools/perf/builtin-timechart.c 	struct per_pid *cursor = tchart->all_data;
tchart            211 tools/perf/builtin-timechart.c 	cursor->next = tchart->all_data;
tchart            212 tools/perf/builtin-timechart.c 	tchart->all_data = cursor;
tchart            216 tools/perf/builtin-timechart.c static void pid_set_comm(struct timechart *tchart, int pid, char *comm)
tchart            220 tools/perf/builtin-timechart.c 	p = find_create_pid(tchart, pid);
tchart            242 tools/perf/builtin-timechart.c static void pid_fork(struct timechart *tchart, int pid, int ppid, u64 timestamp)
tchart            245 tools/perf/builtin-timechart.c 	p = find_create_pid(tchart, pid);
tchart            246 tools/perf/builtin-timechart.c 	pp = find_create_pid(tchart, ppid);
tchart            249 tools/perf/builtin-timechart.c 		pid_set_comm(tchart, pid, pp->current->comm);
tchart            258 tools/perf/builtin-timechart.c static void pid_exit(struct timechart *tchart, int pid, u64 timestamp)
tchart            261 tools/perf/builtin-timechart.c 	p = find_create_pid(tchart, pid);
tchart            267 tools/perf/builtin-timechart.c static void pid_put_sample(struct timechart *tchart, int pid, int type,
tchart            275 tools/perf/builtin-timechart.c 	p = find_create_pid(tchart, pid);
tchart            318 tools/perf/builtin-timechart.c 	struct timechart *tchart = container_of(tool, struct timechart, tool);
tchart            319 tools/perf/builtin-timechart.c 	pid_set_comm(tchart, event->comm.tid, event->comm.comm);
tchart            328 tools/perf/builtin-timechart.c 	struct timechart *tchart = container_of(tool, struct timechart, tool);
tchart            329 tools/perf/builtin-timechart.c 	pid_fork(tchart, event->fork.pid, event->fork.ppid, event->fork.time);
tchart            338 tools/perf/builtin-timechart.c 	struct timechart *tchart = container_of(tool, struct timechart, tool);
tchart            339 tools/perf/builtin-timechart.c 	pid_exit(tchart, event->fork.pid, event->fork.time);
tchart            353 tools/perf/builtin-timechart.c static void c_state_end(struct timechart *tchart, int cpu, u64 timestamp)
tchart            365 tools/perf/builtin-timechart.c 	pwr->next = tchart->power_events;
tchart            367 tools/perf/builtin-timechart.c 	tchart->power_events = pwr;
tchart            370 tools/perf/builtin-timechart.c static void p_state_change(struct timechart *tchart, int cpu, u64 timestamp, u64 new_freq)
tchart            386 tools/perf/builtin-timechart.c 	pwr->next = tchart->power_events;
tchart            389 tools/perf/builtin-timechart.c 		pwr->start_time = tchart->first_time;
tchart            391 tools/perf/builtin-timechart.c 	tchart->power_events = pwr;
tchart            396 tools/perf/builtin-timechart.c 	if ((u64)new_freq > tchart->max_freq)
tchart            397 tools/perf/builtin-timechart.c 		tchart->max_freq = new_freq;
tchart            399 tools/perf/builtin-timechart.c 	if (new_freq < tchart->min_freq || tchart->min_freq == 0)
tchart            400 tools/perf/builtin-timechart.c 		tchart->min_freq = new_freq;
tchart            402 tools/perf/builtin-timechart.c 	if (new_freq == tchart->max_freq - 1000)
tchart            403 tools/perf/builtin-timechart.c 		tchart->turbo_frequency = tchart->max_freq;
tchart            406 tools/perf/builtin-timechart.c static void sched_wakeup(struct timechart *tchart, int cpu, u64 timestamp,
tchart            423 tools/perf/builtin-timechart.c 	we->next = tchart->wake_events;
tchart            424 tools/perf/builtin-timechart.c 	tchart->wake_events = we;
tchart            425 tools/perf/builtin-timechart.c 	p = find_create_pid(tchart, we->wakee);
tchart            432 tools/perf/builtin-timechart.c 		pid_put_sample(tchart, p->pid, p->current->state, cpu,
tchart            439 tools/perf/builtin-timechart.c static void sched_switch(struct timechart *tchart, int cpu, u64 timestamp,
tchart            445 tools/perf/builtin-timechart.c 	prev_p = find_create_pid(tchart, prev_pid);
tchart            447 tools/perf/builtin-timechart.c 	p = find_create_pid(tchart, next_pid);
tchart            450 tools/perf/builtin-timechart.c 		pid_put_sample(tchart, prev_pid, TYPE_RUNNING, cpu,
tchart            455 tools/perf/builtin-timechart.c 			pid_put_sample(tchart, next_pid, p->current->state, cpu,
tchart            547 tools/perf/builtin-timechart.c typedef int (*tracepoint_handler)(struct timechart *tchart,
tchart            558 tools/perf/builtin-timechart.c 	struct timechart *tchart = container_of(tool, struct timechart, tool);
tchart            561 tools/perf/builtin-timechart.c 		if (!tchart->first_time || tchart->first_time > sample->time)
tchart            562 tools/perf/builtin-timechart.c 			tchart->first_time = sample->time;
tchart            563 tools/perf/builtin-timechart.c 		if (tchart->last_time < sample->time)
tchart            564 tools/perf/builtin-timechart.c 			tchart->last_time = sample->time;
tchart            569 tools/perf/builtin-timechart.c 		return f(tchart, evsel, sample,
tchart            577 tools/perf/builtin-timechart.c process_sample_cpu_idle(struct timechart *tchart __maybe_unused,
tchart            586 tools/perf/builtin-timechart.c 		c_state_end(tchart, cpu_id, sample->time);
tchart            593 tools/perf/builtin-timechart.c process_sample_cpu_frequency(struct timechart *tchart,
tchart            601 tools/perf/builtin-timechart.c 	p_state_change(tchart, cpu_id, sample->time, state);
tchart            606 tools/perf/builtin-timechart.c process_sample_sched_wakeup(struct timechart *tchart,
tchart            615 tools/perf/builtin-timechart.c 	sched_wakeup(tchart, sample->cpu, sample->time, waker, wakee, flags, backtrace);
tchart            620 tools/perf/builtin-timechart.c process_sample_sched_switch(struct timechart *tchart,
tchart            629 tools/perf/builtin-timechart.c 	sched_switch(tchart, sample->cpu, sample->time, prev_pid, next_pid,
tchart            636 tools/perf/builtin-timechart.c process_sample_power_start(struct timechart *tchart __maybe_unused,
tchart            649 tools/perf/builtin-timechart.c process_sample_power_end(struct timechart *tchart,
tchart            654 tools/perf/builtin-timechart.c 	c_state_end(tchart, sample->cpu, sample->time);
tchart            659 tools/perf/builtin-timechart.c process_sample_power_frequency(struct timechart *tchart,
tchart            667 tools/perf/builtin-timechart.c 	p_state_change(tchart, cpu_id, sample->time, value);
tchart            676 tools/perf/builtin-timechart.c static void end_sample_processing(struct timechart *tchart)
tchart            681 tools/perf/builtin-timechart.c 	for (cpu = 0; cpu <= tchart->numcpus; cpu++) {
tchart            690 tools/perf/builtin-timechart.c 		pwr->end_time = tchart->last_time;
tchart            693 tools/perf/builtin-timechart.c 		pwr->next = tchart->power_events;
tchart            695 tools/perf/builtin-timechart.c 		tchart->power_events = pwr;
tchart            705 tools/perf/builtin-timechart.c 		pwr->end_time = tchart->last_time;
tchart            708 tools/perf/builtin-timechart.c 		pwr->next = tchart->power_events;
tchart            711 tools/perf/builtin-timechart.c 			pwr->start_time = tchart->first_time;
tchart            713 tools/perf/builtin-timechart.c 			pwr->state = tchart->min_freq;
tchart            714 tools/perf/builtin-timechart.c 		tchart->power_events = pwr;
tchart            718 tools/perf/builtin-timechart.c static int pid_begin_io_sample(struct timechart *tchart, int pid, int type,
tchart            721 tools/perf/builtin-timechart.c 	struct per_pid *p = find_create_pid(tchart, pid);
tchart            763 tools/perf/builtin-timechart.c static int pid_end_io_sample(struct timechart *tchart, int pid, int type,
tchart            766 tools/perf/builtin-timechart.c 	struct per_pid *p = find_create_pid(tchart, pid);
tchart            796 tools/perf/builtin-timechart.c 	if (sample->end_time - sample->start_time < tchart->min_time)
tchart            797 tools/perf/builtin-timechart.c 		sample->end_time = sample->start_time + tchart->min_time;
tchart            823 tools/perf/builtin-timechart.c 	    prev->end_time + tchart->merge_dist >= sample->start_time) {
tchart            836 tools/perf/builtin-timechart.c 	tchart->io_events++;
tchart            842 tools/perf/builtin-timechart.c process_enter_read(struct timechart *tchart,
tchart            847 tools/perf/builtin-timechart.c 	return pid_begin_io_sample(tchart, sample->tid, IOTYPE_READ,
tchart            852 tools/perf/builtin-timechart.c process_exit_read(struct timechart *tchart,
tchart            857 tools/perf/builtin-timechart.c 	return pid_end_io_sample(tchart, sample->tid, IOTYPE_READ,
tchart            862 tools/perf/builtin-timechart.c process_enter_write(struct timechart *tchart,
tchart            867 tools/perf/builtin-timechart.c 	return pid_begin_io_sample(tchart, sample->tid, IOTYPE_WRITE,
tchart            872 tools/perf/builtin-timechart.c process_exit_write(struct timechart *tchart,
tchart            877 tools/perf/builtin-timechart.c 	return pid_end_io_sample(tchart, sample->tid, IOTYPE_WRITE,
tchart            882 tools/perf/builtin-timechart.c process_enter_sync(struct timechart *tchart,
tchart            887 tools/perf/builtin-timechart.c 	return pid_begin_io_sample(tchart, sample->tid, IOTYPE_SYNC,
tchart            892 tools/perf/builtin-timechart.c process_exit_sync(struct timechart *tchart,
tchart            897 tools/perf/builtin-timechart.c 	return pid_end_io_sample(tchart, sample->tid, IOTYPE_SYNC,
tchart            902 tools/perf/builtin-timechart.c process_enter_tx(struct timechart *tchart,
tchart            907 tools/perf/builtin-timechart.c 	return pid_begin_io_sample(tchart, sample->tid, IOTYPE_TX,
tchart            912 tools/perf/builtin-timechart.c process_exit_tx(struct timechart *tchart,
tchart            917 tools/perf/builtin-timechart.c 	return pid_end_io_sample(tchart, sample->tid, IOTYPE_TX,
tchart            922 tools/perf/builtin-timechart.c process_enter_rx(struct timechart *tchart,
tchart            927 tools/perf/builtin-timechart.c 	return pid_begin_io_sample(tchart, sample->tid, IOTYPE_RX,
tchart            932 tools/perf/builtin-timechart.c process_exit_rx(struct timechart *tchart,
tchart            937 tools/perf/builtin-timechart.c 	return pid_end_io_sample(tchart, sample->tid, IOTYPE_RX,
tchart            942 tools/perf/builtin-timechart.c process_enter_poll(struct timechart *tchart,
tchart            947 tools/perf/builtin-timechart.c 	return pid_begin_io_sample(tchart, sample->tid, IOTYPE_POLL,
tchart            952 tools/perf/builtin-timechart.c process_exit_poll(struct timechart *tchart,
tchart            957 tools/perf/builtin-timechart.c 	return pid_end_io_sample(tchart, sample->tid, IOTYPE_POLL,
tchart            964 tools/perf/builtin-timechart.c static void sort_pids(struct timechart *tchart)
tchart            971 tools/perf/builtin-timechart.c 	while (tchart->all_data) {
tchart            972 tools/perf/builtin-timechart.c 		p = tchart->all_data;
tchart            973 tools/perf/builtin-timechart.c 		tchart->all_data = p->next;
tchart           1006 tools/perf/builtin-timechart.c 	tchart->all_data = new_list;
tchart           1010 tools/perf/builtin-timechart.c static void draw_c_p_states(struct timechart *tchart)
tchart           1013 tools/perf/builtin-timechart.c 	pwr = tchart->power_events;
tchart           1024 tools/perf/builtin-timechart.c 	pwr = tchart->power_events;
tchart           1028 tools/perf/builtin-timechart.c 				pwr->state = tchart->min_freq;
tchart           1035 tools/perf/builtin-timechart.c static void draw_wakeups(struct timechart *tchart)
tchart           1041 tools/perf/builtin-timechart.c 	we = tchart->wake_events;
tchart           1047 tools/perf/builtin-timechart.c 		p = tchart->all_data;
tchart           1103 tools/perf/builtin-timechart.c static void draw_cpu_usage(struct timechart *tchart)
tchart           1108 tools/perf/builtin-timechart.c 	p = tchart->all_data;
tchart           1131 tools/perf/builtin-timechart.c static void draw_io_bars(struct timechart *tchart)
tchart           1141 tools/perf/builtin-timechart.c 	p = tchart->all_data;
tchart           1156 tools/perf/builtin-timechart.c 				if (tchart->skip_eagain &&
tchart           1246 tools/perf/builtin-timechart.c static void draw_process_bars(struct timechart *tchart)
tchart           1253 tools/perf/builtin-timechart.c 	Y = 2 * tchart->numcpus + 2;
tchart           1255 tools/perf/builtin-timechart.c 	p = tchart->all_data;
tchart           1335 tools/perf/builtin-timechart.c static int determine_display_tasks_filtered(struct timechart *tchart)
tchart           1341 tools/perf/builtin-timechart.c 	p = tchart->all_data;
tchart           1345 tools/perf/builtin-timechart.c 			p->start_time = tchart->first_time;
tchart           1349 tools/perf/builtin-timechart.c 			p->end_time = tchart->last_time;
tchart           1357 tools/perf/builtin-timechart.c 				c->start_time = tchart->first_time;
tchart           1366 tools/perf/builtin-timechart.c 				c->end_time = tchart->last_time;
tchart           1375 tools/perf/builtin-timechart.c static int determine_display_tasks(struct timechart *tchart, u64 threshold)
tchart           1381 tools/perf/builtin-timechart.c 	p = tchart->all_data;
tchart           1385 tools/perf/builtin-timechart.c 			p->start_time = tchart->first_time;
tchart           1389 tools/perf/builtin-timechart.c 			p->end_time = tchart->last_time;
tchart           1399 tools/perf/builtin-timechart.c 				c->start_time = tchart->first_time;
tchart           1407 tools/perf/builtin-timechart.c 				c->end_time = tchart->last_time;
tchart           1451 tools/perf/builtin-timechart.c static void write_svg_file(struct timechart *tchart, const char *filename)
tchart           1455 tools/perf/builtin-timechart.c 	int thresh = tchart->io_events ? BYTES_THRESH : TIME_THRESH;
tchart           1457 tools/perf/builtin-timechart.c 	if (tchart->power_only)
tchart           1458 tools/perf/builtin-timechart.c 		tchart->proc_num = 0;
tchart           1464 tools/perf/builtin-timechart.c 			count = determine_display_tasks_filtered(tchart);
tchart           1465 tools/perf/builtin-timechart.c 		else if (tchart->io_events)
tchart           1466 tools/perf/builtin-timechart.c 			count = determine_display_io_tasks(tchart, thresh);
tchart           1468 tools/perf/builtin-timechart.c 			count = determine_display_tasks(tchart, thresh);
tchart           1470 tools/perf/builtin-timechart.c 	} while (!process_filter && thresh && count < tchart->proc_num);
tchart           1472 tools/perf/builtin-timechart.c 	if (!tchart->proc_num)
tchart           1475 tools/perf/builtin-timechart.c 	if (tchart->io_events) {
tchart           1476 tools/perf/builtin-timechart.c 		open_svg(filename, 0, count, tchart->first_time, tchart->last_time);
tchart           1481 tools/perf/builtin-timechart.c 		draw_io_bars(tchart);
tchart           1483 tools/perf/builtin-timechart.c 		open_svg(filename, tchart->numcpus, count, tchart->first_time, tchart->last_time);
tchart           1489 tools/perf/builtin-timechart.c 		for (i = 0; i < tchart->numcpus; i++)
tchart           1490 tools/perf/builtin-timechart.c 			svg_cpu_box(i, tchart->max_freq, tchart->turbo_frequency);
tchart           1492 tools/perf/builtin-timechart.c 		draw_cpu_usage(tchart);
tchart           1493 tools/perf/builtin-timechart.c 		if (tchart->proc_num)
tchart           1494 tools/perf/builtin-timechart.c 			draw_process_bars(tchart);
tchart           1495 tools/perf/builtin-timechart.c 		if (!tchart->tasks_only)
tchart           1496 tools/perf/builtin-timechart.c 			draw_c_p_states(tchart);
tchart           1497 tools/perf/builtin-timechart.c 		if (tchart->proc_num)
tchart           1498 tools/perf/builtin-timechart.c 			draw_wakeups(tchart);
tchart           1510 tools/perf/builtin-timechart.c 	struct timechart *tchart = data;
tchart           1514 tools/perf/builtin-timechart.c 		tchart->numcpus = ph->env.nr_cpus_avail;
tchart           1518 tools/perf/builtin-timechart.c 		if (!tchart->topology)
tchart           1532 tools/perf/builtin-timechart.c static int __cmd_timechart(struct timechart *tchart, const char *output_name)
tchart           1598 tools/perf/builtin-timechart.c 		.force = tchart->force,
tchart           1602 tools/perf/builtin-timechart.c 							 &tchart->tool);
tchart           1612 tools/perf/builtin-timechart.c 					    tchart,
tchart           1628 tools/perf/builtin-timechart.c 	end_sample_processing(tchart);
tchart           1630 tools/perf/builtin-timechart.c 	sort_pids(tchart);
tchart           1632 tools/perf/builtin-timechart.c 	write_svg_file(tchart, output_name);
tchart           1635 tools/perf/builtin-timechart.c 		(tchart->last_time - tchart->first_time) / (double)NSEC_PER_SEC, output_name);
tchart           1776 tools/perf/builtin-timechart.c static int timechart__record(struct timechart *tchart, int argc, const char **argv)
tchart           1824 tools/perf/builtin-timechart.c 	if (tchart->power_only)
tchart           1827 tools/perf/builtin-timechart.c 	if (tchart->tasks_only) {
tchart           1832 tools/perf/builtin-timechart.c 	if (!tchart->with_backtrace)
tchart           1918 tools/perf/builtin-timechart.c 	struct timechart tchart = {
tchart           1932 tools/perf/builtin-timechart.c 	OPT_BOOLEAN('P', "power-only", &tchart.power_only, "output power data only"),
tchart           1933 tools/perf/builtin-timechart.c 	OPT_BOOLEAN('T', "tasks-only", &tchart.tasks_only, "output processes data only"),
tchart           1949 tools/perf/builtin-timechart.c 	OPT_INTEGER('n', "proc-num", &tchart.proc_num,
tchart           1951 tools/perf/builtin-timechart.c 	OPT_BOOLEAN('t', "topology", &tchart.topology,
tchart           1953 tools/perf/builtin-timechart.c 	OPT_BOOLEAN(0, "io-skip-eagain", &tchart.skip_eagain,
tchart           1955 tools/perf/builtin-timechart.c 	OPT_CALLBACK(0, "io-min-time", &tchart.min_time, "time",
tchart           1958 tools/perf/builtin-timechart.c 	OPT_CALLBACK(0, "io-merge-dist", &tchart.merge_dist, "time",
tchart           1961 tools/perf/builtin-timechart.c 	OPT_BOOLEAN('f', "force", &tchart.force, "don't complain, do it"),
tchart           1970 tools/perf/builtin-timechart.c 	OPT_BOOLEAN('I', "io-only", &tchart.io_only,
tchart           1972 tools/perf/builtin-timechart.c 	OPT_BOOLEAN('g', "callchain", &tchart.with_backtrace, "record callchain"),
tchart           1982 tools/perf/builtin-timechart.c 	if (tchart.power_only && tchart.tasks_only) {
tchart           1992 tools/perf/builtin-timechart.c 		if (tchart.power_only && tchart.tasks_only) {
tchart           1997 tools/perf/builtin-timechart.c 		if (tchart.io_only)
tchart           2000 tools/perf/builtin-timechart.c 			return timechart__record(&tchart, argc, argv);
tchart           2006 tools/perf/builtin-timechart.c 	return __cmd_timechart(&tchart, output_name);