lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 18 Jan 2012 13:43:06 +0900
From:	Akihiro Nagai <akihiro.nagai.hw@...achi.com>
To:	Arnaldo Carvalho de Melo <acme@...radead.org>
Cc:	Ingo Molnar <mingo@...e.hu>, Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	David Ahern <dsahern@...il.com>, linux-kernel@...r.kernel.org,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	yrl.pp-manager.tt@...achi.com, Paul Mackerras <paulus@...ba.org>
Subject: Re: [PATCH -tip v4 1/5] perf-script: unify the expressions indicate
 "unknown"

(2012/01/18 0:49), Arnaldo Carvalho de Melo wrote:
> 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 :)
I see. I'm going to fix and resend my patches,
e.g. map__print_dsoname(self) => map__fprintf_dsoname(map, fp)

Thank you.
>
> Thanks,
>
> - Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ