public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Corey Ashford <cjashfor@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/6] perf_counter: add more context information
Date: Tue, 07 Apr 2009 09:27:53 -0700	[thread overview]
Message-ID: <49DB7F09.8050900@linux.vnet.ibm.com> (raw)
In-Reply-To: <1239088274.798.5524.camel@twins>

Peter Zijlstra wrote:
> On Mon, 2009-04-06 at 14:33 -0700, Corey Ashford wrote:
>> Peter Zijlstra wrote:
>>> On Mon, 2009-04-06 at 14:15 -0700, Corey Ashford wrote:
>>>> Peter Zijlstra wrote:
>>>>> On Mon, 2009-04-06 at 13:16 -0700, Corey Ashford wrote:
>>>>>
>>>>>>>> One downside of this approach is that you if you specify "no header" 
>>>>>>>> (currently not possible, but maybe later?), you will not be able to get 
>>>>>>>> the level bits.
>>>>>>> Would this be desirable? 
>>>>>> I think it would.  For one use case I'm working on right now, simple 
>>>>>> profiling, all I need are ip's.  If I could omit the header, that would 
>>>>>> reduce the frequency of sigio's by a factor of three, and make it faster 
>>>>>> to read up the ip's when the SIGIO's occur.
>>>>> Self-profiling?
>>>>>
>>>>> So you're interested in getting the smallest possible record size, that
>>>>> would still be 2 u64, right? Otherwise you don't get the IP context that
>>>>> started this.
>>>>>
>>>>>
>>>> Self-profiling mainly, yes.  PAPI specs an ability for remote monitoring 
>>>> of processes and threads, but I think it's only partially implemented.
>>>>
>>>> So when you are talking about IP context, you mean pid/tid?
>>> Ah, we called it level before, the hv/kernel/user thing. For remote
>>> profiling you'd want to have the mmap thing too.
>> Oh I see.  In PAPI, the user specifies the range(s) of addresses he's 
>> interested in profiling (any sampled IP's outside the requested ranges 
>> are discarded), and so as long as the kernel space IP's don't overlap 
>> with user space IP's, we should be fine.
> 
> Ah, while this would be true for most 'sane' architectures, Paul was
> right in pointing out that this is not true for all architectures -- and
> we should therefore not rely on address range alone.
> 
> You could of course use: hw_event.exclude_{hv,kernel} = 1 to ensure you
> only get userspace thingies I suppose (but then you have no way of
> telling how many you missed I guess).

That's a good point.  PAPI's profiling API doesn't have a way for the 
caller to distinguish which address spaces (user/kernel/hv) he wants to 
profile.  It does have a way to designate which levels to ignore, but if 
you enable them all, you cannot specify the profiling address ranges 
pertaining to each.  That may be something I could propose adding to 
PAPI.  I suspect it would be pretty rarely used, though.

- Corey


  reply	other threads:[~2009-04-07 16:28 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-02  9:11 [PATCH 0/6] more perf_counter stuff Peter Zijlstra
2009-04-02  9:11 ` [PATCH 1/6] perf_counter: move the event overflow output bits to record_type Peter Zijlstra
2009-04-02 11:28   ` Ingo Molnar
2009-04-02 11:43   ` Ingo Molnar
2009-04-02 11:47     ` Peter Zijlstra
2009-04-02 12:03   ` [tip:perfcounters/core] " Peter Zijlstra
2009-04-02 22:33   ` [PATCH 1/6] " Corey Ashford
2009-04-02 23:27     ` Corey Ashford
2009-04-03  6:50       ` Peter Zijlstra
2009-04-03  7:30         ` Corey Ashford
2009-04-02  9:12 ` [PATCH 2/6] RFC perf_counter: singleshot support Peter Zijlstra
2009-04-02 10:51   ` Ingo Molnar
2009-04-02 11:48     ` Peter Zijlstra
2009-04-02 12:26       ` Ingo Molnar
2009-04-02 21:23         ` Paul Mackerras
2009-04-02 12:18   ` Peter Zijlstra
2009-04-02 18:10     ` Ingo Molnar
2009-04-02 18:33       ` Peter Zijlstra
2009-04-02  9:12 ` [PATCH 3/6] perf_counter: per event wakeups Peter Zijlstra
2009-04-02 11:32   ` Ingo Molnar
2009-04-02 12:03   ` [tip:perfcounters/core] " Peter Zijlstra
2009-04-02  9:12 ` [PATCH 4/6] perf_counter: kerneltop: update to new ABI Peter Zijlstra
2009-04-02 12:03   ` [tip:perfcounters/core] " Peter Zijlstra
2009-04-02 13:35     ` Jaswinder Singh Rajput
2009-04-02 13:59       ` Jaswinder Singh Rajput
2009-04-02 18:11         ` Ingo Molnar
2009-04-02 18:22           ` Jaswinder Singh Rajput
2009-04-02 18:28             ` Ingo Molnar
2009-04-02 18:38               ` Jaswinder Singh Rajput
2009-04-02 19:20                 ` Ingo Molnar
2009-04-02 18:51               ` Jaswinder Singh Rajput
2009-04-02 18:32             ` Jaswinder Singh Rajput
2009-04-02  9:12 ` [PATCH 5/6] perf_counter: add more context information Peter Zijlstra
2009-04-02 11:36   ` Ingo Molnar
2009-04-02 11:46     ` Peter Zijlstra
2009-04-02 18:16       ` Ingo Molnar
2009-04-02 11:48     ` Peter Zijlstra
2009-04-02 18:18       ` Ingo Molnar
2009-04-02 18:29         ` Peter Zijlstra
2009-04-02 18:34           ` Ingo Molnar
2009-04-02 18:42             ` Peter Zijlstra
2009-04-02 19:19               ` Ingo Molnar
2009-04-02 12:04   ` [tip:perfcounters/core] " Peter Zijlstra
2009-04-03 12:50   ` [PATCH 5/6] " Peter Zijlstra
2009-04-03 18:25     ` Corey Ashford
2009-04-06 11:01       ` Peter Zijlstra
2009-04-06 11:07         ` Peter Zijlstra
2009-04-06 18:53           ` Corey Ashford
2009-04-06 19:06             ` Peter Zijlstra
2009-04-06 20:16               ` Corey Ashford
2009-04-06 20:46                 ` Peter Zijlstra
2009-04-06 21:15                   ` Corey Ashford
2009-04-06 21:21                     ` Peter Zijlstra
2009-04-06 21:33                       ` Corey Ashford
2009-04-07  7:11                         ` Peter Zijlstra
2009-04-07 16:27                           ` Corey Ashford [this message]
2009-04-02  9:12 ` [PATCH 6/6] perf_counter: update mmap() counter read Peter Zijlstra
2009-04-02 12:04   ` [tip:perfcounters/core] " Peter Zijlstra

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=49DB7F09.8050900@linux.vnet.ibm.com \
    --to=cjashfor@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.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