From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753188Ab3JVLD2 (ORCPT ); Tue, 22 Oct 2013 07:03:28 -0400 Received: from forward-corp1e.mail.yandex.net ([77.88.60.199]:39500 "EHLO forward-corp1e.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753036Ab3JVLD0 (ORCPT ); Tue, 22 Oct 2013 07:03:26 -0400 X-Greylist: delayed 374 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Oct 2013 07:03:26 EDT Authentication-Results: smtpcorp4.mail.yandex.net; dkim=pass header.i=@yandex-team.ru From: Stanislav Fomichev To: a.p.zijlstra@chello.nl, paulus@samba.org, mingo@redhat.com, acme@ghostprotocols.net Cc: linux-kernel@vger.kernel.org Subject: [PATCH 4/6] perf timechart: group figures and add title with details Date: Tue, 22 Oct 2013 14:56:50 +0400 Message-Id: <1382439412-23713-5-git-send-email-stfomichev@yandex-team.ru> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1382439412-23713-1-git-send-email-stfomichev@yandex-team.ru> References: <1382439412-23713-1-git-send-email-stfomichev@yandex-team.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add titles to figures so we can run SVG interactively in Firefox and check event details in the tooltips. This also aids exploring SVG with Inkscape because when user clicks on one part of logical figure, all parts are selected. It's also possible to read titles with Inkscape in the object details. Signed-off-by: Stanislav Fomichev --- tools/perf/builtin-timechart.c | 4 ++-- tools/perf/util/svghelper.c | 54 +++++++++++++++++++++++++++++++++++++++++- tools/perf/util/svghelper.h | 3 ++- 3 files changed, 57 insertions(+), 4 deletions(-) diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index c7b30a8c7f3b..4d2ac96b75b1 100644 --- a/tools/perf/builtin-timechart.c +++ b/tools/perf/builtin-timechart.c @@ -798,9 +798,9 @@ static void draw_process_bars(void) if (sample->type == TYPE_RUNNING) svg_sample(Y, sample->cpu, sample->start_time, sample->end_time); if (sample->type == TYPE_BLOCKED) - svg_box(Y, sample->start_time, sample->end_time, "blocked"); + svg_blocked(Y, sample->cpu, sample->start_time, sample->end_time); if (sample->type == TYPE_WAITING) - svg_waiting(Y, sample->start_time, sample->end_time); + svg_waiting(Y, sample->cpu, sample->start_time, sample->end_time); sample = sample->next; } diff --git a/tools/perf/util/svghelper.c b/tools/perf/util/svghelper.c index 96c866045d60..c41be3c5722b 100644 --- a/tools/perf/util/svghelper.c +++ b/tools/perf/util/svghelper.c @@ -95,6 +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, " \n"); + fprintf(svgfile, "\n"); fprintf(svgfile, "\n", svg_page_width, total_height); fprintf(svgfile, "\n