Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1714673
| Path | csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Taeung Song <treeze.taeung@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/4] perf annotate stdio: Support --show-nr-samples option |
| Date | Fri, 18 Aug 2017 10:20:02 +0200 |
| Message-ID | <ufKFA-RX-25@gated-at.bofh.it> (permalink) |
| References | <ueLNo-2Xb-25@gated-at.bofh.it> <ueQk3-5RL-41@gated-at.bofh.it> <ufuKt-6EM-5@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=L7f20Acm5r5NDFY9F7DgaaOvaqvjJbMXulF2sFHKkSk=; b=ULUIkOBHAR0P5VOpWSN1NZv/0/DkwcIhhNlWVY2AXX6oYjiekoxhe2KmWfKqsDpeg9 UxPYpIL+W7Y49uKNFkYk09lszX0znwlk3+/xvIq4cVXbrEie6yBXCEjQ6NFYBCj96BBn 85AYxxDR5/DZgCzJQQbOXlrLUVynqjjdpO+14bgTSUgvqvSXSkd3w7mg3WH3VPv47XC3 xpfVIx8dFbUxK9udH/kFd4l1D4F1Wa3uUxqTgnsHOtu30ELSKQsCa4KEcMvGY7mDom26 DoY+R0Jd4ZXyJZLrSWesXig04T3qj88W2+KCzm5fgJgh/ZyQRf84pexIX2GIX/IhC3Yq 2ujQ== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=L7f20Acm5r5NDFY9F7DgaaOvaqvjJbMXulF2sFHKkSk=; b=GyuBQDkEzA37pLUNCEGPHrq6LURXAGf8d5pEF2YfKpPL75fJIQafSNOODpYKzpwpxI +Pej1Upq+ampejGwnDYG544dgVw5Ww7sEORXuKqpMgXFpNh9qV9s2DFJO9KKsw/E5Oml sX0J4eDq+kkW8sqR2rms53hC6qFp5C2BSLOT3PVzALltmWyRg4JwHpCL2W1HPlsmtJCY Pv9n8MssXa8/5XnW1DF8DP+XtaslMpu7zym6FMMMJFrJlh4uOzCINMo3lPO8zDWG4LMb 8fpGWNV9UBggTkCSvqopGhkaSYsSzzkR6ZzcGgugDFQ6Rb7g9s0HAa0YD6jxPXwvbEok eg5g== |
| X-Gm-Message-State | AHYfb5jt78b609CkAb0eAIwrfuK1L5oT+Rgfx7QjK0gWoFtGe8H7SBVI 246ljeLxcjth2Q== |
| X-Received | by 10.99.94.65 with SMTP id s62mr570859pgb.374.1503044171197; Fri, 18 Aug 2017 01:16:11 -0700 (PDT) |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Language | en-US |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 73 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, Namhyung Kim <namhyung@kernel.org>, Milian Wolff <milian.wolff@kdab.com>, Jiri Olsa <jolsa@redhat.com> |
| X-Original-Date | Fri, 18 Aug 2017 17:16:06 +0900 |
| X-Original-Message-ID | <69f8e5bc-1981-0ca1-c6ad-1d7ad2b8dddc@gmail.com> |
| X-Original-References | <1502809989-18145-1-git-send-email-treeze.taeung@gmail.com> <20170815200631.GD22988@kernel.org> <20170817151653.GA10891@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1714673 |
Show key headers only | View raw
Hi Arnaldo,
On 08/18/2017 12:16 AM, Arnaldo Carvalho de Melo wrote:
> Em Tue, Aug 15, 2017 at 05:06:31PM -0300, Arnaldo Carvalho de Melo escreveu:
>> Em Wed, Aug 16, 2017 at 12:13:09AM +0900, Taeung Song escreveu:
>>> Add --show-nr-samples option to perf-annotate
>>> so that it corresponds with perf-report.
>>
>> I'll fold the second patch (2/4) with this one, thanks.
>
> So, I was going to do that, please do it since there is another thing
> missing here, document the new option in
> tools/perf/Documentation/perf-annotate.txt.
>
> - Arnaldo
>
Yep, got it, will add the new option --show-nr-samples
into Documentation/perf-annotate.txt
Thanks,
Taeung
>> - Arnaldo
>>
>>> Cc: Namhyung Kim <namhyung@kernel.org>
>>> Cc: Milian Wolff <milian.wolff@kdab.com>
>>> Cc: Jiri Olsa <jolsa@redhat.com>
>>> Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
>>> ---
>>> tools/perf/builtin-annotate.c | 2 ++
>>> tools/perf/util/annotate.c | 6 +++++-
>>> 2 files changed, 7 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
>>> index 658c920..acde4cc 100644
>>> --- a/tools/perf/builtin-annotate.c
>>> +++ b/tools/perf/builtin-annotate.c
>>> @@ -445,6 +445,8 @@ int cmd_annotate(int argc, const char **argv)
>>> "Show event group information together"),
>>> OPT_BOOLEAN(0, "show-total-period", &symbol_conf.show_total_period,
>>> "Show a column with the sum of periods"),
>>> + OPT_BOOLEAN('n', "show-nr-samples", &symbol_conf.show_nr_samples,
>>> + "Show a column with the number of samples"),
>>> OPT_CALLBACK_DEFAULT(0, "stdio-color", NULL, "mode",
>>> "'always' (default), 'never' or 'auto' only applicable to --stdio mode",
>>> stdio__config_color, "always"),
>>> diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
>>> index 2dab0e5..4397a8b 100644
>>> --- a/tools/perf/util/annotate.c
>>> +++ b/tools/perf/util/annotate.c
>>> @@ -1145,6 +1145,9 @@ static int disasm_line__print(struct disasm_line *dl, struct symbol *sym, u64 st
>>> if (symbol_conf.show_total_period)
>>> color_fprintf(stdout, color, " %11" PRIu64,
>>> sample.period);
>>> + else if (symbol_conf.show_nr_samples)
>>> + color_fprintf(stdout, color, " %7" PRIu64,
>>> + sample.nr_samples);
>>> else
>>> color_fprintf(stdout, color, " %7.2f", percent);
>>> }
>>> @@ -1825,7 +1828,8 @@ int symbol__annotate_printf(struct symbol *sym, struct map *map,
>>> width *= evsel->nr_members;
>>>
>>> graph_dotted_len = printf(" %-*.*s| Source code & Disassembly of %s for %s (%" PRIu64 " samples)\n",
>>> - width, width, symbol_conf.show_total_period ? "Event count" : "Percent",
>>> + width, width, symbol_conf.show_total_period ? "Period" :
>>> + symbol_conf.show_nr_samples ? "Samples" : "Percent",
>>> d_filename, evsel_name, h->nr_samples);
>>>
>>> printf("%-*.*s----\n",
>>> --
>>> 2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 1/4] perf annotate stdio: Support --show-nr-samples option Taeung Song <treeze.taeung@gmail.com> - 2017-08-15 17:20 +0200
Re: [PATCH v2 1/4] perf annotate stdio: Support --show-nr-samples option Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-15 22:10 +0200
Re: [PATCH v2 1/4] perf annotate stdio: Support --show-nr-samples option Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-17 17:20 +0200
Re: [PATCH v2 1/4] perf annotate stdio: Support --show-nr-samples option Taeung Song <treeze.taeung@gmail.com> - 2017-08-18 10:20 +0200
csiph-web