From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Akihiro Nagai <akihiro.nagai.hw@hitachi.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
David Ahern <dsahern@gmail.com>,
linux-kernel@vger.kernel.org,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
yrl.pp-manager.tt@hitachi.com, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH -tip v4 1/5] perf-script: unify the expressions indicate "unknown"
Date: Tue, 17 Jan 2012 13:49:02 -0200 [thread overview]
Message-ID: <20120117154902.GA15820@infradead.org> (raw)
In-Reply-To: <20120116052210.2485.80894.stgit@linux3>
Em Mon, Jan 16, 2012 at 02:22:10PM +0900, Akihiro Nagai escreveu:
> perf-script uses various expressions to indicate "unknown".
> It is unfriendly for user scripts to parse it. So, this patch unifies
> the expressions to "[unknown]".
> diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h
> @@ -118,6 +118,7 @@ void map__delete(struct map *self);
> size_t map__fprintf(struct map *self, FILE *fp);
> +void map__print_dsoname(struct map *self);
See map__fprintf(), everything that is for printing to a file like
output has that form: last paramenter is a FILE pointer, then users do:
map__fprintf_dsoname(map, stdout);
or to stderr, or to something else, like in cases where tools have a
'strace -o FILENAME' like switch, like 'perf stat --log-fd N':
OPT_INTEGER(0, "log-fd", &output_fd,
"log output to fd, instead of stderr"),
That uses fdreopen(output_fd), etc.
So please convert these new __print_something methods to
__fprintf_something(..., FILE *fp).
Also please don't use 'self' anymore, that was a bad decision I made in
perf's early ages and that Thomas Gleixner suggested we use more
descriptive names such as, in the above case, 'map', i.e.:
void map__fprintf_dsoname(struct map *map, FILE *fp);
>From time to time I convert these 'self' leftovers in areas where I
notice that are not having too much coding activity, to avoid clashing
with pending patches, so lets not add more in new code :)
Thanks,
- Arnaldo
next prev parent reply other threads:[~2012-01-17 15:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-16 5:21 [PATCH -tip v4 0/5] perf script: add BTS analysis features Akihiro Nagai
2012-01-16 5:22 ` [PATCH -tip v4 1/5] perf-script: unify the expressions indicate "unknown" Akihiro Nagai
2012-01-17 15:37 ` David Ahern
2012-01-17 15:49 ` Arnaldo Carvalho de Melo [this message]
2012-01-18 4:43 ` Akihiro Nagai
2012-01-18 4:47 ` David Ahern
2012-01-19 8:05 ` Akihiro Nagai
2012-01-16 5:22 ` [PATCH -tip v4 2/5] perf: set correct value to perf_event_header.misc for BTS Akihiro Nagai
2012-01-16 5:22 ` [PATCH -tip v4 3/5] perf script: enhance IP and ADDR correlate detection " Akihiro Nagai
2012-01-16 5:22 ` [PATCH -tip v4 4/5] perf script: add the offset field specifier Akihiro Nagai
2012-01-17 16:04 ` David Ahern
2012-01-16 5:22 ` [PATCH -tip v4 5/5] perf script: add option resolving vmlinux path Akihiro Nagai
2012-01-18 11:48 ` [PATCH -tip v4 0/5] perf script: add BTS analysis features Frederic Weisbecker
2012-01-20 7:59 ` Akihiro Nagai
2012-01-20 13:38 ` Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120117154902.GA15820@infradead.org \
--to=acme@infradead.org \
--cc=akihiro.nagai.hw@hitachi.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=yrl.pp-manager.tt@hitachi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.