public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: David Ahern <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: perf: thread is its own parent
Date: Thu, 19 Mar 2015 09:20:48 -0400	[thread overview]
Message-ID: <20150319132048.GB162412@redhat.com> (raw)
In-Reply-To: <550A10B1.9080701@gmail.com>

On Wed, Mar 18, 2015 at 05:56:33PM -0600, David Ahern wrote:
> Don:
> 
> In this commit:
> 
> commit 363b785f3805a2632eb09a8b430842461c21a640
> Author: Don Zickus <dzickus@redhat.com>
> Date:   Fri Mar 14 10:43:44 2014 -0400
> 
>     perf tools: Speed up thread map generation
> 
> you made a thread its own parent when synthesizing fork events:
> 
> static int perf_event__synthesize_fork(struct perf_tool *tool,
>                                        union perf_event *event, pid_t pid,
>                                        pid_t tgid,
> perf_event__handler_t process,
>                                        struct machine *machine)
> {
>         memset(&event->fork, 0, sizeof(event->fork) +
> machine->id_hdr_size);
> 
>         event->fork.ppid = tgid;
>         event->fork.ptid = tgid;
>         event->fork.pid  = tgid;
>         event->fork.tid  = pid;
>         event->fork.header.type = PERF_RECORD_FORK;
> 
> 
> Any particular reason or just an oversight?

Hi David,

Honestly I don't recall.   The commit log tells you the problem I was trying
to solve.  Instead of parsing text strings from /proc/maps/<pid>, I believe
it was waaaay faster to copy the thread maps.

This could have been an oversight.  I might have falsely assumed tgid ==
ppid?

Are you finding a problem with it?

Cheers,
Don

  reply	other threads:[~2015-03-19 13:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 23:56 perf: thread is its own parent David Ahern
2015-03-19 13:20 ` Don Zickus [this message]
2015-03-19 13:56   ` David Ahern
2015-03-19 14:27     ` Don Zickus

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=20150319132048.GB162412@redhat.com \
    --to=dzickus@redhat.com \
    --cc=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.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