From: Namhyung Kim <namhyung.kim@lge.com>
To: David Ahern <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>,
Namhyung Kim <namhyung@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFD] perf: Integrate logging facilities
Date: Tue, 13 Mar 2012 10:08:11 +0900 [thread overview]
Message-ID: <4F5E9DFB.40203@lge.com> (raw)
In-Reply-To: <4F5E1BA4.2000209@gmail.com>
Hi,
2012-03-13 12:52 AM, David Ahern wrote:
> On 3/12/12 3:58 AM, Namhyung Kim wrote:
>> This is a rough idea and there can be things I am missing. So I need to
>> listen to your advices.
>
> What Arnaldo proposed was having core, library code return error codes and not
> print anything to the user. Higher layers (commands only?) can take the return
> error code and pass it to perf_<subsystem>_strerror() to dump a user friendly
> string for the error. See
>
> http://lkml.org/lkml/2012/2/13/302
>
It will work well for error cases, but how about warnings? I mean the case of
something like handling new features on old kernels. I want give a (warning)
message to user but let the code keep going instead of returning to the user.
It seems not possible on above scenario, so should it be handled at all in
higher layers? Couldn't the core code have that kind of flexiblity?
And current library code has lots of calls to pr_debug*, dump_printf as well
as (something-or-)die. How can we handle this? For debugging functions, it
cannot be moved out of the library for obvious reasons. For die, it can be
converted to return a error code, but it might require adding non-trivial
error handling path especially for deeply nested code IMHO.
Also, I think my proposal can still be applied for higher layer codes. It'd be
better to standardize logging facilities at least for high level in order to
be flexible for future changes.
Thanks,
Namhyung
prev parent reply other threads:[~2012-03-13 1:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 9:58 [RFD] perf: Integrate logging facilities Namhyung Kim
2012-03-12 15:52 ` David Ahern
2012-03-13 1:08 ` Namhyung Kim [this message]
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=4F5E9DFB.40203@lge.com \
--to=namhyung.kim@lge.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=namhyung@gmail.com \
--cc=paulus@samba.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox