linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hari Bathini <hbathini@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: ast@fb.com, lkml <linux-kernel@vger.kernel.org>,
	acme@kernel.org, alexander.shishkin@linux.intel.com,
	mingo@redhat.com, daniel@iogearbox.net, rostedt@goodmis.org,
	Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
	ebiederm@xmission.com, sargun@sargun.me,
	Aravinda Prasad <aravinda@linux.vnet.ibm.com>,
	brendan.d.gregg@gmail.com
Subject: Re: [PATCH v2 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info
Date: Fri, 9 Dec 2016 15:40:36 +0530	[thread overview]
Message-ID: <e09b6841-bc34-ede5-c7d8-f5becdcd1cee@linux.vnet.ibm.com> (raw)
In-Reply-To: <3d42dd8c-446d-f0de-1853-b78190a109c6@linux.vnet.ibm.com>



On Friday 09 December 2016 12:10 AM, Hari Bathini wrote:
> Hi Peter,
>
>
> Sorry for taking so long to respond...
>
>
> On Thursday 24 November 2016 08:40 PM, Peter Zijlstra wrote:
>> On Thu, Nov 24, 2016 at 08:14:29PM +0530, Hari Bathini wrote:
>>> @@ -862,6 +875,19 @@ enum perf_event_type {
>>>        */
>>>       PERF_RECORD_SWITCH_CPU_WIDE        = 15,
>>>   +    /*
>>> +     * struct {
>>> +     *    struct perf_event_header    header;
>>> +     *
>>> +     *    u32                pid, tid;
>>> +     *    u64                time;
>> pid,tid and time are already present in sample_id. Many of the 'legacy'
>> record have redundant information since we added sample_id, but most of
>> the new ones haven't and rely on sample_all being set.
>
> I tried using pid/tid from sample data, but realized that pid/tid in 
> event_id
> could be different from the one in sample data, at least for 
> fork/namespaces
> events, since __perf_event_header__init_id( ) that updates the sample 
> data
> is getting the pid/tid of current task.
>
> I am not sure if it is advisable to change 
> __perf_event_header__init_id( ) for this..?
>

Hi Peter,

Adding task parameter to __perf_event_header__init_id( ) and doing 
something like..

         perf_event_pid(event, task ? task : current)
         perf_event_tid(event, task ? task : current)


Also, for synthesized events, sample_id is not updated currently. 
Working on it as that
is needed if we want to relay on pid, tid values from sample_id. Let me 
know, if this is
what you had in mind or something else altogether..

Thanks
Hari

  reply	other threads:[~2016-12-09 10:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24 14:44 [PATCH v2 0/3] perf: add support for analyzing events for containers Hari Bathini
2016-11-24 14:44 ` [PATCH v2 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info Hari Bathini
2016-11-24 15:10   ` Peter Zijlstra
2016-12-08 18:40     ` Hari Bathini
2016-12-09 10:10       ` Hari Bathini [this message]
2016-12-09 14:09       ` Peter Zijlstra
2016-12-12 18:25         ` Hari Bathini
2016-11-24 22:55   ` kbuild test robot
2016-11-24 14:44 ` [PATCH v2 2/3] perf tool: " Hari Bathini
2016-11-24 14:45 ` [PATCH v2 3/3] perf tool: add cgroup identifier entry in perf report Hari Bathini

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=e09b6841-bc34-ede5-c7d8-f5becdcd1cee@linux.vnet.ibm.com \
    --to=hbathini@linux.vnet.ibm.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=aravinda@linux.vnet.ibm.com \
    --cc=ast@fb.com \
    --cc=brendan.d.gregg@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sargun@sargun.me \
    /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;
as well as URLs for NNTP newsgroup(s).