aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-10-20 01:51:41 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-20 01:51:44 -0400
commitc258449bc9d286e2ee6546c9cdf911e96cbc126a (patch)
tree51d389391bf6bef4be756652e401823f8171656e /tools/perf
parent79b9ad361be8c6f3eeea97dd3883e8bcfa989333 (diff)
parent2e600d01c131ee189f55ca1879cd364b9e056df8 (diff)
Merge branch 'perf/urgent' into perf/core
Merge reason: Queue up dependent patch. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/builtin-timechart.c28
-rw-r--r--tools/perf/builtin-top.c2
-rwxr-xr-xtools/perf/util/PERF-VERSION-GEN2
-rw-r--r--tools/perf/util/svghelper.c2
4 files changed, 30 insertions, 4 deletions
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 702d8fe58fbc..e8a510d935e5 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -765,19 +765,40 @@ static void draw_wakeups(void)
765 if (c->Y && c->start_time <= we->time && c->end_time >= we->time) { 765 if (c->Y && c->start_time <= we->time && c->end_time >= we->time) {
766 if (p->pid == we->waker) { 766 if (p->pid == we->waker) {
767 from = c->Y; 767 from = c->Y;
768 task_from = c->comm; 768 task_from = strdup(c->comm);
769 } 769 }
770 if (p->pid == we->wakee) { 770 if (p->pid == we->wakee) {
771 to = c->Y; 771 to = c->Y;
772 task_to = c->comm; 772 task_to = strdup(c->comm);
773 } 773 }
774 } 774 }
775 c = c->next; 775 c = c->next;
776 } 776 }
777 c = p->all;
778 while (c) {
779 if (p->pid == we->waker && !from) {
780 from = c->Y;
781 task_from = strdup(c->comm);
782 }
783 if (p->pid == we->wakee && !to) {
784 to = c->Y;
785 task_to = strdup(c->comm);
786 }
787 c = c->next;
788 }
777 } 789 }
778 p = p->next; 790 p = p->next;
779 } 791 }
780 792
793 if (!task_from) {
794 task_from = malloc(40);
795 sprintf(task_from, "[%i]", we->waker);
796 }
797 if (!task_to) {
798 task_to = malloc(40);
799 sprintf(task_to, "[%i]", we->wakee);
800 }
801
781 if (we->waker == -1) 802 if (we->waker == -1)
782 svg_interrupt(we->time, to); 803 svg_interrupt(we->time, to);
783 else if (from && to && abs(from - to) == 1) 804 else if (from && to && abs(from - to) == 1)
@@ -785,6 +806,9 @@ static void draw_wakeups(void)
785 else 806 else
786 svg_partial_wakeline(we->time, from, task_from, to, task_to); 807 svg_partial_wakeline(we->time, from, task_from, to, task_to);
787 we = we->next; 808 we = we->next;
809
810 free(task_from);
811 free(task_to);
788 } 812 }
789} 813}
790 814
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 2d8806bac258..cc6628630303 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -663,6 +663,8 @@ static void handle_keypress(int c)
663 switch (c) { 663 switch (c) {
664 case 'd': 664 case 'd':
665 prompt_integer(&delay_secs, "Enter display delay"); 665 prompt_integer(&delay_secs, "Enter display delay");
666 if (delay_secs < 1)
667 delay_secs = 1;
666 break; 668 break;
667 case 'e': 669 case 'e':
668 prompt_integer(&print_entries, "Enter display entries (lines)"); 670 prompt_integer(&print_entries, "Enter display entries (lines)");
diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN
index c561d1538c03..54552a00a117 100755
--- a/tools/perf/util/PERF-VERSION-GEN
+++ b/tools/perf/util/PERF-VERSION-GEN
@@ -1,7 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2 2
3GVF=PERF-VERSION-FILE 3GVF=PERF-VERSION-FILE
4DEF_VER=v0.0.1.PERF 4DEF_VER=v0.0.2.PERF
5 5
6LF=' 6LF='
7' 7'
diff --git a/tools/perf/util/svghelper.c b/tools/perf/util/svghelper.c
index 856655d8b0b8..b3637db025a2 100644
--- a/tools/perf/util/svghelper.c
+++ b/tools/perf/util/svghelper.c
@@ -103,7 +103,7 @@ void open_svg(const char *filename, int cpus, int rows, u64 start, u64 end)
103 fprintf(svgfile, " rect.process2 { fill:rgb(180,180,180); fill-opacity:0.9; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); 103 fprintf(svgfile, " rect.process2 { fill:rgb(180,180,180); fill-opacity:0.9; stroke-width:0; stroke:rgb( 0, 0, 0); } \n");
104 fprintf(svgfile, " rect.sample { fill:rgb( 0, 0,255); fill-opacity:0.8; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); 104 fprintf(svgfile, " rect.sample { fill:rgb( 0, 0,255); fill-opacity:0.8; stroke-width:0; stroke:rgb( 0, 0, 0); } \n");
105 fprintf(svgfile, " rect.blocked { fill:rgb(255, 0, 0); fill-opacity:0.5; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); 105 fprintf(svgfile, " rect.blocked { fill:rgb(255, 0, 0); fill-opacity:0.5; stroke-width:0; stroke:rgb( 0, 0, 0); } \n");
106 fprintf(svgfile, " rect.waiting { fill:rgb(214,214, 0); fill-opacity:0.3; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); 106 fprintf(svgfile, " rect.waiting { fill:rgb(224,214, 0); fill-opacity:0.8; stroke-width:0; stroke:rgb( 0, 0, 0); } \n");
107 fprintf(svgfile, " rect.WAITING { fill:rgb(255,214, 48); fill-opacity:0.6; stroke-width:0; stroke:rgb( 0, 0, 0); } \n"); 107 fprintf(svgfile, " rect.WAITING { fill:rgb(255,214, 48); fill-opacity:0.6; stroke-width:0; stroke:rgb( 0, 0, 0); } \n");
108 fprintf(svgfile, " rect.cpu { fill:rgb(192,192,192); fill-opacity:0.2; stroke-width:0.5; stroke:rgb(128,128,128); } \n"); 108 fprintf(svgfile, " rect.cpu { fill:rgb(192,192,192); fill-opacity:0.2; stroke-width:0.5; stroke:rgb(128,128,128); } \n");
109 fprintf(svgfile, " rect.pstate { fill:rgb(128,128,128); fill-opacity:0.8; stroke-width:0; } \n"); 109 fprintf(svgfile, " rect.pstate { fill:rgb(128,128,128); fill-opacity:0.8; stroke-width:0; } \n");