diff options
Diffstat (limited to 'tools/perf/util/svghelper.c')
| -rw-r--r-- | tools/perf/util/svghelper.c | 15 | 
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/perf/util/svghelper.c b/tools/perf/util/svghelper.c index b3637db025a..96c866045d6 100644 --- a/tools/perf/util/svghelper.c +++ b/tools/perf/util/svghelper.c @@ -12,6 +12,7 @@   * of the License.   */ +#include <inttypes.h>  #include <stdio.h>  #include <stdlib.h>  #include <unistd.h> @@ -43,11 +44,11 @@ static double cpu2y(int cpu)  	return cpu2slot(cpu) * SLOT_MULT;  } -static double time2pixels(u64 time) +static double time2pixels(u64 __time)  {  	double X; -	X = 1.0 * svg_page_width * (time - first_time) / (last_time - first_time); +	X = 1.0 * svg_page_width * (__time - first_time) / (last_time - first_time);  	return X;  } @@ -94,7 +95,7 @@ void open_svg(const char *filename, int cpus, int rows, u64 start, u64 end)  	total_height = (1 + rows + cpu2slot(cpus)) * SLOT_MULT;  	fprintf(svgfile, "<?xml version=\"1.0\" standalone=\"no\"?> \n"); -	fprintf(svgfile, "<svg width=\"%i\" height=\"%llu\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n", svg_page_width, total_height); +	fprintf(svgfile, "<svg width=\"%i\" height=\"%" PRIu64 "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n", svg_page_width, total_height);  	fprintf(svgfile, "<defs>\n  <style type=\"text/css\">\n    <![CDATA[\n"); @@ -455,9 +456,9 @@ void svg_legenda(void)  		return;  	svg_legenda_box(0,	"Running", "sample"); -	svg_legenda_box(100,	"Idle","rect.c1"); -	svg_legenda_box(200,	"Deeper Idle", "rect.c3"); -	svg_legenda_box(350,	"Deepest Idle", "rect.c6"); +	svg_legenda_box(100,	"Idle","c1"); +	svg_legenda_box(200,	"Deeper Idle", "c3"); +	svg_legenda_box(350,	"Deepest Idle", "c6");  	svg_legenda_box(550,	"Sleeping", "process2");  	svg_legenda_box(650,	"Waiting for cpu", "waiting");  	svg_legenda_box(800,	"Blocked on IO", "blocked"); @@ -483,7 +484,7 @@ void svg_time_grid(void)  			color = 128;  		} -		fprintf(svgfile, "<line x1=\"%4.8f\" y1=\"%4.2f\" x2=\"%4.8f\" y2=\"%llu\" style=\"stroke:rgb(%i,%i,%i);stroke-width:%1.3f\"/>\n", +		fprintf(svgfile, "<line x1=\"%4.8f\" y1=\"%4.2f\" x2=\"%4.8f\" y2=\"%" PRIu64 "\" style=\"stroke:rgb(%i,%i,%i);stroke-width:%1.3f\"/>\n",  			time2pixels(i), SLOT_MULT/2, time2pixels(i), total_height, color, color, color, thickness);  		i += 10000000;  |