All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung.kim@lge.com>
To: David Ahern <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/7] perf tools: Introduce perf_target__strerror()
Date: Tue, 08 May 2012 10:57:12 +0900	[thread overview]
Message-ID: <87r4uvcu4n.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <4FA809AD.7060209@gmail.com> (David Ahern's message of "Mon, 07 May 2012 11:43:09 -0600")

Hi,

On Mon, 07 May 2012 11:43:09 -0600, David Ahern wrote:
> On 5/7/12 11:29 AM, Arnaldo Carvalho de Melo wrote:
>> Em Mon, May 07, 2012 at 02:09:02PM +0900, Namhyung Kim escreveu:
>>> The perf_target__strerror() sets @buf to a string that
>>> describes the (perf_target-specific) error condition
>>> that is passed via @errnum.
>>>
>>> This is similar to strerror_r() and does same thing if
>>> @errnum has a standard errno value.
>>
>> This has a problem: why should I be warned when I do, as root:
>>
>> # perf top -u acme
>>
>> It warns me that "UID switch overriding SYSTEM", yeah, right that is
>> what I asked, no need to tell me that :-)
>>
>> So what is missing in this case is that top starts with system_wide set,
>> not from the command line.
>>
> Seems like we should avoid the propagation of the errnos beyond the
> depths of the library part. For perf-top why not default to nothing
> set and if the user does not request one, set system wide. i.e,
> following Patch 6 in this set do:
>
> if (perf_target__none(&top.target)
>     top.target.system_wide = true;
>

Thanks for catching this (and sorry for not testing thoroughly).

Yes, this would make more sense if it goes to the patch 1. Now I see
that Arnaldo fixed it on patch 1 but forgot to update on patch 6 :).

Thanks,
Namhyung


  reply	other threads:[~2012-05-08  1:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07  5:08 [PATCH 0/7] perf tools: Fix cpu/thread map handling v3 Namhyung Kim
2012-05-07  5:08 ` [PATCH 1/7] perf top: Defaults to system_wide target Namhyung Kim
2012-05-07  5:08 ` [PATCH 2/7] perf evlist: Fix creation of cpu map Namhyung Kim
2012-05-11  6:39   ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-05-07  5:09 ` [PATCH 3/7] perf target: Introduce perf_target_errno Namhyung Kim
2012-05-11  6:40   ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-05-07  5:09 ` [PATCH 4/7] perf target: Introduce perf_target__parse_uid() Namhyung Kim
2012-05-11  6:41   ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-05-07  5:09 ` [PATCH 5/7] perf tools: Introduce perf_target__strerror() Namhyung Kim
2012-05-07 17:29   ` Arnaldo Carvalho de Melo
2012-05-07 17:43     ` David Ahern
2012-05-08  1:57       ` Namhyung Kim [this message]
2012-05-08 13:17         ` Arnaldo Carvalho de Melo
2012-05-11  6:42   ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-05-07  5:09 ` [PATCH 6/7] perf target: Consolidate target task/cpu checking Namhyung Kim
2012-05-11  6:42   ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-05-07  5:09 ` [PATCH 7/7] perf stat: Use perf_evlist__create_maps Namhyung Kim
2012-05-11  6:43   ` [tip:perf/core] " tip-bot for Namhyung Kim

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=87r4uvcu4n.fsf@sejong.aot.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@redhat.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 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.