Skip to content
Snippets Groups Projects
user avatar
Michael Petlan authored
Bugzilla: https://bugzilla.redhat.com/2069073

upstream
========
commit bc355822f0d9623b632069105d425c822d124cc8
Author: Ian Rogers <irogers@google.com>
Date:   Mon Mar 21 15:33:44 2022 -0700

description
===========
If slots isn't with a topdown event then moving it is unnecessary. For
example {instructions, slots} is re-ordered:

  $ perf stat -e '{instructions,slots}' -a sleep 1

   Performance counter stats for 'system wide':

         936,600,825      slots
         144,440,968      instructions

         1.006061423 seconds time elapsed

Which can break tools expecting the command line order to match the
printed order. It is necessary to move the slots event first when it
appears with topdown events. Add extra checking so that the slots event
is only moved in the case of there being a topdown event like:

  $ perf stat -e '{instructions,slots,topdown-fe-bound}' -a sleep 1

   Performance counter stats for 'system wide':

          2427568570      slots
           300927614      instructions
           551021649      topdown-fe-bound

         1.001771803 seconds time elapsed

Fixes: 94dbfd6781a0e87b ("perf parse-events: Architecture specific leader override")

Link: https://lore.kernel.org/r/20220321223344.1034479-1-irogers@google.com



Signed-off-by: default avatarMichael Petlan <mpetlan@redhat.com>
a9e78fe8
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Name Last commit Last update
..