linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: acme@kernel.org
Cc: jolsa@redhat.com, dzickus@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: perf overlapping maps...
Date: Tue, 23 Oct 2018 11:15:03 -0700 (PDT)	[thread overview]
Message-ID: <20181023.111503.1978409398989251135.davem@davemloft.net> (raw)
In-Reply-To: <20181023180503.GA6114@kernel.org>

From: Arnaldo Carvalho de Melo <acme@kernel.org>
Date: Tue, 23 Oct 2018 15:05:03 -0300

> IIRC this was first done for 'perf record', where we have to stash those
> events in the perf.data file, to then, later, 'perf report' to process
> those, so when working on 'perf top', it just reuses that machinery.
> 
> Sure, with some love and care 'perf top' could do better and update all
> the data structures directly :-)

Thanks for the history, it is useful information :)

> Anyway, have you guys considered tweaking using event->header.misc |=
> PERF_RECORD_MISC_USER? The kernel leaves that as zero for the
> PERF_RECORD_FORK it emits:

I really would like to steer the approach away from using UAPI
perf_event fields in an internal way.

I am really very sorry for suggesting such a scheme myself in the
first place.  It really was a bad idea upon much consideration.

The synthetic fork is not really a fork, it's more like a "create".

And this fundamental semantic difference is why we have all of these
issues wrt. handling COMM and parent map inheritance.

There is also a bunch of non-trivial code to deal with whether we
synthetically create the child or the parent first, wrt. finding
thread leaders and parent threads.

What I'm trying to say is that there is a clean design based solution
hiding somewhere in here and I'd like to find it :-)

  reply	other threads:[~2018-10-23 18:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-20  4:05 perf overlapping maps David Miller
2018-10-20  4:44 ` David Miller
2018-10-22 14:07   ` Don Zickus
2018-10-22 16:16     ` Jiri Olsa
2018-10-22 17:10       ` Don Zickus
2018-10-22 17:58       ` David Miller
2018-10-23  6:34         ` Jiri Olsa
2018-10-23 17:54           ` David Miller
2018-10-23 18:05             ` Arnaldo Carvalho de Melo
2018-10-23 18:15               ` David Miller [this message]
2018-10-23 19:27                 ` Arnaldo Carvalho de Melo
2018-10-24 11:34                 ` Jiri Olsa
2018-10-24 21:30                   ` David Miller

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=20181023.111503.1978409398989251135.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=acme@kernel.org \
    --cc=dzickus@redhat.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;
as well as URLs for NNTP newsgroup(s).