aboutsummaryrefslogtreecommitdiffstats
path: root/trace-graph.c
diff options
context:
space:
mode:
Diffstat (limited to 'trace-graph.c')
-rw-r--r--trace-graph.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/trace-graph.c b/trace-graph.c
index 2214141..d62882c 100644
--- a/trace-graph.c
+++ b/trace-graph.c
@@ -1510,6 +1510,9 @@ static void draw_plots(struct graph_info *ginfo, gint new_width)
1510 set_color(ginfo->draw, plot->gc, plot->last_color); 1510 set_color(ginfo->draw, plot->gc, plot->last_color);
1511 } 1511 }
1512 1512
1513 tracecmd_set_all_cpus_to_timestamp(ginfo->handle,
1514 ginfo->view_start_time);
1515
1513 /* Shortcut if we don't have any task plots */ 1516 /* Shortcut if we don't have any task plots */
1514 if (!ginfo->nr_task_hash && !ginfo->all_recs) { 1517 if (!ginfo->nr_task_hash && !ginfo->all_recs) {
1515 for (cpu = 0; cpu < ginfo->cpus; cpu++) { 1518 for (cpu = 0; cpu < ginfo->cpus; cpu++) {
@@ -1518,6 +1521,14 @@ static void draw_plots(struct graph_info *ginfo, gint new_width)
1518 continue; 1521 continue;
1519 1522
1520 while ((record = tracecmd_read_data(ginfo->handle, cpu))) { 1523 while ((record = tracecmd_read_data(ginfo->handle, cpu))) {
1524 if (record->ts < ginfo->view_start_time) {
1525 free_record(record);
1526 continue;
1527 }
1528 if (record->ts > ginfo->view_end_time) {
1529 free_record(record);
1530 break;
1531 }
1521 for (list = hash->plots; list; list = list->next) 1532 for (list = hash->plots; list; list = list->next)
1522 draw_plot(ginfo, list->plot, record); 1533 draw_plot(ginfo, list->plot, record);
1523 free_record(record); 1534 free_record(record);
@@ -1527,6 +1538,14 @@ static void draw_plots(struct graph_info *ginfo, gint new_width)
1527 } 1538 }
1528 1539
1529 while ((record = tracecmd_read_next_data(ginfo->handle, &cpu))) { 1540 while ((record = tracecmd_read_next_data(ginfo->handle, &cpu))) {
1541 if (record->ts < ginfo->view_start_time) {
1542 free_record(record);
1543 continue;
1544 }
1545 if (record->ts > ginfo->view_end_time) {
1546 free_record(record);
1547 break;
1548 }
1530 hash = trace_graph_plot_find_cpu(ginfo, cpu); 1549 hash = trace_graph_plot_find_cpu(ginfo, cpu);
1531 if (hash) { 1550 if (hash) {
1532 for (list = hash->plots; list; list = list->next) 1551 for (list = hash->plots; list; list = list->next)