diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-09-29 17:25:55 -0400 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-09-29 17:25:55 -0400 |
| commit | 7a67bb21f120fc0da6943a5557ef5af06d881ff0 (patch) | |
| tree | a5a2ed9714a38809293c003d2132f31ef7839614 | |
| parent | cfde60c05a5acc9ff7e4bff8326f6ae6a83e3c7d (diff) | |
Initial viewing area size determined using rt-timestamps, not ftrace timestamps.
| -rw-r--r-- | rt-plot.c | 13 | ||||
| -rw-r--r-- | rt-plot.h | 4 | ||||
| -rwxr-xr-x | set_debug.sh | 2 | ||||
| -rw-r--r-- | trace-graph.c | 6 |
4 files changed, 15 insertions, 10 deletions
| @@ -377,7 +377,7 @@ next_rts(struct graph_info *ginfo, int cpu, unsigned long long ft_target) | |||
| 377 | * The @cpu seek location will be placed before the given time, but will | 377 | * The @cpu seek location will be placed before the given time, but will |
| 378 | * not necessarily be placed _right_ before the time. | 378 | * not necessarily be placed _right_ before the time. |
| 379 | */ | 379 | */ |
| 380 | void | 380 | unsigned long long |
| 381 | set_cpu_to_rts(struct graph_info *ginfo, unsigned long long rt_target, int cpu) | 381 | set_cpu_to_rts(struct graph_info *ginfo, unsigned long long rt_target, int cpu) |
| 382 | { | 382 | { |
| 383 | struct record *record; | 383 | struct record *record; |
| @@ -429,16 +429,21 @@ set_cpu_to_rts(struct graph_info *ginfo, unsigned long long rt_target, int cpu) | |||
| 429 | free_record(record); | 429 | free_record(record); |
| 430 | } else | 430 | } else |
| 431 | tracecmd_set_cpu_to_timestamp(ginfo->handle, cpu, seek_time); | 431 | tracecmd_set_cpu_to_timestamp(ginfo->handle, cpu, seek_time); |
| 432 | return rts; | ||
| 432 | } | 433 | } |
| 433 | 434 | ||
| 434 | /** | 435 | /** |
| 435 | * set_cpus_to_time - seek all cpus to real-time @rt_target | 436 | * set_cpus_to_time - seek all cpus to real-time @rt_target |
| 436 | */ | 437 | */ |
| 437 | void set_cpus_to_rts(struct graph_info *ginfo, unsigned long long rt_target) | 438 | unsigned long long set_cpus_to_rts(struct graph_info *ginfo, unsigned long long rt_target) |
| 438 | { | 439 | { |
| 439 | int cpu; | 440 | int cpu; |
| 440 | for (cpu = 0; cpu < ginfo->cpus; cpu++) | 441 | unsigned long long min_rts = ULLONG_MAX; |
| 441 | set_cpu_to_rts(ginfo, rt_target, cpu); | 442 | for (cpu = 0; cpu < ginfo->cpus; cpu++) { |
| 443 | unsigned long long rts = set_cpu_to_rts(ginfo, rt_target, cpu); | ||
| 444 | min_rts = MIN(min_rts, rts); | ||
| 445 | } | ||
| 446 | return min_rts; | ||
| 442 | } | 447 | } |
| 443 | 448 | ||
| 444 | 449 | ||
| @@ -70,9 +70,9 @@ find_rt_display_record(struct graph_info *ginfo, | |||
| 70 | 70 | ||
| 71 | unsigned long long next_rts(struct graph_info *ginfo, int cpu, | 71 | unsigned long long next_rts(struct graph_info *ginfo, int cpu, |
| 72 | unsigned long long ft_target); | 72 | unsigned long long ft_target); |
| 73 | void set_cpu_to_rts(struct graph_info *ginfo, | 73 | unsigned long long set_cpu_to_rts(struct graph_info *ginfo, |
| 74 | unsigned long long rt_target, int cpu); | 74 | unsigned long long rt_target, int cpu); |
| 75 | void set_cpus_to_rts(struct graph_info *ginfo, | 75 | unsigned long long set_cpus_to_rts(struct graph_info *ginfo, |
| 76 | unsigned long long rt_target); | 76 | unsigned long long rt_target); |
| 77 | int is_task_running(struct graph_info *ginfo, | 77 | int is_task_running(struct graph_info *ginfo, |
| 78 | unsigned long long time, | 78 | unsigned long long time, |
diff --git a/set_debug.sh b/set_debug.sh index 95a8c74..19bb76c 100755 --- a/set_debug.sh +++ b/set_debug.sh | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | PATTERN="(define debug[a-z_]+\s*)[0-9]+" | 2 | PATTERN="(define debug[a-z_]+\s*)[-0-9]+" |
| 3 | sed -ri "s/$PATTERN/\\1$1/gi" *.[ch] | 3 | sed -ri "s/$PATTERN/\\1$1/gi" *.[ch] |
| 4 | grep -HirE "$PATTERN" *.[ch] \ No newline at end of file | 4 | grep -HirE "$PATTERN" *.[ch] \ No newline at end of file |
diff --git a/trace-graph.c b/trace-graph.c index c2f3574..58baf79 100644 --- a/trace-graph.c +++ b/trace-graph.c | |||
| @@ -1915,7 +1915,7 @@ static void draw_hashed_plots(struct graph_info *ginfo) | |||
| 1915 | rt_graph_check_server_param(ARG, &dint, &dull, &dull); | 1915 | rt_graph_check_server_param(ARG, &dint, &dull, &dull); |
| 1916 | #undef ARG | 1916 | #undef ARG |
| 1917 | if (rt_graph_check_sys_release(ginfo, record, &rel)) { | 1917 | if (rt_graph_check_sys_release(ginfo, record, &rel)) { |
| 1918 | min_time = rel + ginfo->rtg_info.start_offset * NSECS_PER_SEC; | 1918 | min_time = rel; |
| 1919 | ginfo->rtg_info.start_time = min_time; | 1919 | ginfo->rtg_info.start_time = min_time; |
| 1920 | ginfo->view_start_time = min_time; | 1920 | ginfo->view_start_time = min_time; |
| 1921 | ginfo->start_time = min_time; | 1921 | ginfo->start_time = min_time; |
| @@ -2542,7 +2542,7 @@ static int load_handle(struct graph_info *ginfo, | |||
| 2542 | continue; | 2542 | continue; |
| 2543 | 2543 | ||
| 2544 | if (record->ts < ginfo->start_time) | 2544 | if (record->ts < ginfo->start_time) |
| 2545 | ginfo->start_time = record->ts; | 2545 | ginfo->start_time = get_rts(ginfo, record); |
| 2546 | 2546 | ||
| 2547 | free_record(record); | 2547 | free_record(record); |
| 2548 | record = tracecmd_read_cpu_last(handle, cpu); | 2548 | record = tracecmd_read_cpu_last(handle, cpu); |
| @@ -2550,7 +2550,7 @@ static int load_handle(struct graph_info *ginfo, | |||
| 2550 | continue; | 2550 | continue; |
| 2551 | 2551 | ||
| 2552 | if (record->ts > ginfo->end_time) | 2552 | if (record->ts > ginfo->end_time) |
| 2553 | ginfo->end_time = record->ts; | 2553 | ginfo->end_time = get_rts(ginfo, record); |
| 2554 | free_record(record); | 2554 | free_record(record); |
| 2555 | } | 2555 | } |
| 2556 | 2556 | ||
