All of lore.kernel.org
 help / color / mirror / Atom feed
From: Corey Ashford <cjashfor@linux.vnet.ibm.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] perf_counter: move the event overflow output bits to record_type
Date: Thu, 02 Apr 2009 16:27:35 -0700	[thread overview]
Message-ID: <49D549E7.1040904@linux.vnet.ibm.com> (raw)
In-Reply-To: <49D53D2B.30108@linux.vnet.ibm.com>

Whoops, nevermind.

My misunderstanding on this one.  This enum is used for event type, not 
the record_type, and as such is makes sense for there to be exclusive 
mmap and munmap event records.

Thinking about this a bit, I'm guessing that the idea is to track the 
loading and unloading of shared objects which uses mmap and munmap, so 
that that the ip can be related to a particular object that was mapped 
in at the time of the counter overflow interrupt.  Is that right?

- Corey

Corey Ashford wrote:
> Peter Zijlstra wrote:
>> Per suggestion from Paul, move the event overflow bits to record_type
>> and sanitize the enums a bit.
>>
>> Breaks the ABI -- again ;-)
>>
> [snip]
> 
> With this patch, the definitions look like this now:
> 
> [snip]
> /*
>  * Bits that can be set in hw_event.record_type to request information
>  * in the overflow packets.
>  */
> enum perf_counter_record_format {
>         PERF_RECORD_IP          = 1U << 0,
>         PERF_RECORD_TID         = 1U << 1,
>         PERF_RECORD_GROUP       = 1U << 2,
>         PERF_RECORD_CALLCHAIN   = 1U << 3,
> };
> 
> [snip]
> enum perf_event_type {
> 
>         PERF_EVENT_MMAP                 = 1,
>         PERF_EVENT_MUNMAP               = 2,
> 
>         /*
>          * Half the event type space is reserved for the counter overflow
>          * bitfields, as found in hw_event.record_type.
>          *
>          * These events will have types of the form:
>          *   PERF_EVENT_COUNTER_OVERFLOW { | __PERF_EVENT_* } *
>          */
>         PERF_EVENT_COUNTER_OVERFLOW     = 1UL << 31,
>         __PERF_EVENT_IP                 = PERF_RECORD_IP,
>         __PERF_EVENT_TID                = PERF_RECORD_TID,
>         __PERF_EVENT_GROUP              = PERF_RECORD_GROUP,
>         __PERF_EVENT_CALLCHAIN          = PERF_RECORD_CALLCHAIN,
> };
> [snip]
> 
> 
> Unless I'm misreading something here, there's overlap in the enum values 
> of perf_event_type enum. PERF_EVENT_MMAP has the same value as 
> __PERF_EVENT_IP, and PERF_EVENT_MUNMAP has the same value as 
> __PERF_EVENT_TID.
> 
> Are these lower bits being reused when PERF_EVENT_COUNTER_OVERFLOW is 
> OR'd in, which would imply that PERF_EVENT_MMAP and PERF_EVENT_MUNMAP 
> are mutually exclusive with all of the PERF_EVENT_COUNTER_OVERFLOW values.
> 
> Actually, I don't really understand the purpose of the PERF_EVENT_MMAP 
> and PERF_EVENT_MUNMAP bits. My hazy understanding is that they are used 
> for finding the file, function and line number at overflow interrupt 
> time, but it's unclear to me what that has to do with mmap.  I'll go 
> back and try to find the relevant patch notes again.
> 
> - Corey
> 
> 
> 
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Regards,

- Corey

Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
Beaverton, OR
503-578-3507
cjashfor@us.ibm.com


  reply	other threads:[~2009-04-02 23: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 [this message]
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
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=49D549E7.1040904@linux.vnet.ibm.com \
    --to=cjashfor@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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.