Skip to contentSkip to conversation

perf tools: Synthesize GROUP_DESC feature in pipe mode

PATCH In review Jiri Olsa 5 participants 8 messages Jul 12, 2018 – Jul 25, 2018 perf events

lore
Share & tools
lore

Jiri Olsa

author reviewer
#0 lore raw

PATCH 1/1 perf tools: Synthesize GROUP_DESC feature in pipe mode

Stephan reported, that pipe mode does not carry the group information and thus the piped report won't display the grouped output for following command:

  # perf record -e '{cycles,instructions,branches}' -a sleep 4 | perf report

It has no idea about the group setup, so it will display events separately:

  # Overhead  Command          Shared Object             ...
  # ........  ...............  .......................
  #
       6.71%  swapper          [kernel.kallsyms]
       2.28%  offlineimap      libpython2.7.so.1.0
       0.78%  perf             [kernel.kallsyms]

...

Fixing GROUP_DESC feature record to be synthesized in pipe mode, so the report output is grouped if there's group defined in record:

  #                 Overhead  Command          Shared    ...
  # ........................  ...............  .......
  #
       7.57%   0.16%   0.30%  swapper          [kernel
       1.87%   3.15%   2.46%  offlineimap      libpyth
       1.33%   0.00%   0.00%  perf             [kernel

...

---
 tools/perf/util/header.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/header.c +1 -1
index 59fcc790c865..af9aaf28f976 100644
@@ -2587,7 +2587,7 @@ static const struct feature_ops feat_ops[HEADER_LAST_FEATURE] = {
 	FEAT_OPR(NUMA_TOPOLOGY,	numa_topology,	true),
 	FEAT_OPN(BRANCH_STACK,	branch_stack,	false),
 	FEAT_OPR(PMU_MAPPINGS,	pmu_mappings,	false),
-	FEAT_OPN(GROUP_DESC,	group_desc,	false),
+	FEAT_OPR(GROUP_DESC,	group_desc,	false),
 	FEAT_OPN(AUXTRACE,	auxtrace,	false),
 	FEAT_OPN(STAT,		stat,		false),
 	FEAT_OPN(CACHE,		cache,		true),
Signature · 1 line
2.17.1
#1 lore raw

Hi Jiri,

Quoted 5 lines · Jiri Olsa

Stephan reported, that pipe mode does not carry the group information and thus the piped report won't display the grouped output for following command:

Thanks for fixing this quickly.
I think we should have more testing on the pipe mode, in general.

Quoted 48 lines
  # perf record -e '{cycles,instructions,branches}' -a sleep 4 | perf report

It has no idea about the group setup, so it will display events separately:

  # Overhead  Command          Shared Object             ...
  # ........  ...............  .......................
  #
       6.71%  swapper          [kernel.kallsyms]
       2.28%  offlineimap      libpython2.7.so.1.0
       0.78%  perf             [kernel.kallsyms]

...

Fixing GROUP_DESC feature record to be synthesized in pipe mode, so the report output is grouped if there's group defined in record:

  #                 Overhead  Command          Shared    ...
  # ........................  ...............  .......
  #
       7.57%   0.16%   0.30%  swapper          [kernel
       1.87%   3.15%   2.46%  offlineimap      libpyth
       1.33%   0.00%   0.00%  perf             [kernel

...

---
 tools/perf/util/header.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/header.c +1 -2
index 59fcc790c865..af9aaf28f976 100644
@@ -2587,7 +2587,7 @@ static const struct feature_ops feat_ops[HEADER_LAST_FEATURE] = {
        FEAT_OPR(NUMA_TOPOLOGY, numa_topology,  true),
        FEAT_OPN(BRANCH_STACK,  branch_stack,   false),
        FEAT_OPR(PMU_MAPPINGS,  pmu_mappings,   false),
-       FEAT_OPN(GROUP_DESC,    group_desc,     false),
+       FEAT_OPR(GROUP_DESC,    group_desc,     false),
        FEAT_OPN(AUXTRACE,      auxtrace,       false),
        FEAT_OPN(STAT,          stat,           false),
        FEAT_OPN(CACHE,         cache,          true),
--

2.17.1

#2 lore raw
Quoted 8 lines · Stephane Eranian

Hi Jiri,

Quoted 5 lines · Jiri Olsa

Stephan reported, that pipe mode does not carry the group information and thus the piped report won't display the grouped output for following command:

Thanks for fixing this quickly.

could I have your tested/acked by?

Quoted 1 line

I think we should have more testing on the pipe mode, in general.

yea, we should

jirka

Quoted 49 lines
Quoted 49 lines
  # perf record -e '{cycles,instructions,branches}' -a sleep 4 | perf report

It has no idea about the group setup, so it will display events separately:

  # Overhead  Command          Shared Object             ...
  # ........  ...............  .......................
  #
       6.71%  swapper          [kernel.kallsyms]
       2.28%  offlineimap      libpython2.7.so.1.0
       0.78%  perf             [kernel.kallsyms]

...

Fixing GROUP_DESC feature record to be synthesized in pipe mode, so the report output is grouped if there's group defined in record:

  #                 Overhead  Command          Shared    ...
  # ........................  ...............  .......
  #
       7.57%   0.16%   0.30%  swapper          [kernel
       1.87%   3.15%   2.46%  offlineimap      libpyth
       1.33%   0.00%   0.00%  perf             [kernel

...

---
 tools/perf/util/header.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/header.c +1 -2
index 59fcc790c865..af9aaf28f976 100644
@@ -2587,7 +2587,7 @@ static const struct feature_ops feat_ops[HEADER_LAST_FEATURE] = {
        FEAT_OPR(NUMA_TOPOLOGY, numa_topology,  true),
        FEAT_OPN(BRANCH_STACK,  branch_stack,   false),
        FEAT_OPR(PMU_MAPPINGS,  pmu_mappings,   false),
-       FEAT_OPN(GROUP_DESC,    group_desc,     false),
+       FEAT_OPR(GROUP_DESC,    group_desc,     false),
        FEAT_OPN(AUXTRACE,      auxtrace,       false),
        FEAT_OPN(STAT,          stat,           false),
        FEAT_OPN(CACHE,         cache,          true),
--

2.17.1

#3 lore raw

Hi Jiri,

Quoted 5 lines · Jiri Olsa
Quoted 3 lines · Stephane Eranian

Hi Jiri,

Quoted 1 line · Jiri Olsa
Quoted 8 lines
Quoted 5 lines
Quoted 4 lines

Stephan reported, that pipe mode does not carry the group information and thus the piped report won't display the grouped output for following command:

Thanks for fixing this quickly.

could I have your tested/acked by?

Quoted 55 lines
Quoted 1 line

I think we should have more testing on the pipe mode, in general.

yea, we should

jirka

Quoted 49 lines
Quoted 49 lines
  # perf record -e '{cycles,instructions,branches}' -a sleep 4 | perf report

It has no idea about the group setup, so it will display events separately:

  # Overhead  Command          Shared Object             ...
  # ........  ...............  .......................
  #
       6.71%  swapper          [kernel.kallsyms]
       2.28%  offlineimap      libpython2.7.so.1.0
       0.78%  perf             [kernel.kallsyms]

...

Fixing GROUP_DESC feature record to be synthesized in pipe mode, so the report output is grouped if there's group defined in record:

  #                 Overhead  Command          Shared    ...
  # ........................  ...............  .......
  #
       7.57%   0.16%   0.30%  swapper          [kernel
       1.87%   3.15%   2.46%  offlineimap      libpyth
       1.33%   0.00%   0.00%  perf             [kernel

...

---
 tools/perf/util/header.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/header.c +1 -2
index 59fcc790c865..af9aaf28f976 100644
@@ -2587,7 +2587,7 @@ static const struct feature_ops feat_ops[HEADER_LAST_FEATURE] = {
        FEAT_OPR(NUMA_TOPOLOGY, numa_topology,  true),
        FEAT_OPN(BRANCH_STACK,  branch_stack,   false),
        FEAT_OPR(PMU_MAPPINGS,  pmu_mappings,   false),
-       FEAT_OPN(GROUP_DESC,    group_desc,     false),
+       FEAT_OPR(GROUP_DESC,    group_desc,     false),
        FEAT_OPN(AUXTRACE,      auxtrace,       false),
        FEAT_OPN(STAT,          stat,           false),
        FEAT_OPN(CACHE,         cache,          true),
--

2.17.1

maintainer Tested-by Stephane Eranian
#4 lore raw

Em Thu, Jul 12, 2018 at 11:18:05PM -0700, Stephane Eranian escreveu:

Quoted 11 lines

Hi Jiri,

Quoted 9 lines · Jiri Olsa
Quoted 7 lines · Stephane Eranian

Hi Jiri,

Quoted 5 lines · Jiri Olsa

Stephan reported, that pipe mode does not carry the group information and thus the piped report won't display the grouped output for following command:

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Thanks for fixing this quickly.

could I have your tested/acked by?

Applying, Stephane, please consider providing a

When you actually applied the patch, built and tested, so that we can have this reflect better what actually was done.

Acked-by is more like hey, I briefly looked at the patch, looks good. I.e. no actual test was performed, which I think wasn't the case here, but will keep what you provided (Acked-by) as I'm not sure you actually tested.

Thanks,

- Arnaldo

Quoted 55 lines
Quoted 55 lines
Quoted 1 line

I think we should have more testing on the pipe mode, in general.

yea, we should

jirka

Quoted 49 lines
Quoted 49 lines
  # perf record -e '{cycles,instructions,branches}' -a sleep 4 | perf report

It has no idea about the group setup, so it will display events separately:

  # Overhead  Command          Shared Object             ...
  # ........  ...............  .......................
  #
       6.71%  swapper          [kernel.kallsyms]
       2.28%  offlineimap      libpython2.7.so.1.0
       0.78%  perf             [kernel.kallsyms]

...

Fixing GROUP_DESC feature record to be synthesized in pipe mode, so the report output is grouped if there's group defined in record:

  #                 Overhead  Command          Shared    ...
  # ........................  ...............  .......
  #
       7.57%   0.16%   0.30%  swapper          [kernel
       1.87%   3.15%   2.46%  offlineimap      libpyth
       1.33%   0.00%   0.00%  perf             [kernel

...

---
 tools/perf/util/header.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/header.c +1 -2
index 59fcc790c865..af9aaf28f976 100644
@@ -2587,7 +2587,7 @@ static const struct feature_ops feat_ops[HEADER_LAST_FEATURE] = {
        FEAT_OPR(NUMA_TOPOLOGY, numa_topology,  true),
        FEAT_OPN(BRANCH_STACK,  branch_stack,   false),
        FEAT_OPR(PMU_MAPPINGS,  pmu_mappings,   false),
-       FEAT_OPN(GROUP_DESC,    group_desc,     false),
+       FEAT_OPR(GROUP_DESC,    group_desc,     false),
        FEAT_OPN(AUXTRACE,      auxtrace,       false),
        FEAT_OPN(STAT,          stat,           false),
        FEAT_OPN(CACHE,         cache,          true),
--

2.17.1

#5 lore raw

Hi Arnaldo,

Quoted 13 lines · Arnaldo Carvalho de Melo

Em Thu, Jul 12, 2018 at 11:18:05PM -0700, Stephane Eranian escreveu:

Quoted 11 lines

Hi Jiri,

Quoted 9 lines · Jiri Olsa
Quoted 7 lines · Stephane Eranian

Hi Jiri,

Quoted 5 lines · Jiri Olsa

Stephan reported, that pipe mode does not carry the group information and thus the piped report won't display the grouped output for following command:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Thanks for fixing this quickly.

could I have your tested/acked by?

Applying, Stephane, please consider providing a

Sorry about that.

Quoted 68 lines

When you actually applied the patch, built and tested, so that we can have this reflect better what actually was done.

Acked-by is more like hey, I briefly looked at the patch, looks good. I.e. no actual test was performed, which I think wasn't the case here, but will keep what you provided (Acked-by) as I'm not sure you actually tested.

Thanks,

- Arnaldo

Quoted 55 lines
Quoted 55 lines
Quoted 1 line

I think we should have more testing on the pipe mode, in general.

yea, we should

jirka

Quoted 49 lines
Quoted 49 lines
  # perf record -e '{cycles,instructions,branches}' -a sleep 4 | perf report

It has no idea about the group setup, so it will display events separately:

  # Overhead  Command          Shared Object             ...
  # ........  ...............  .......................
  #
       6.71%  swapper          [kernel.kallsyms]
       2.28%  offlineimap      libpython2.7.so.1.0
       0.78%  perf             [kernel.kallsyms]

...

Fixing GROUP_DESC feature record to be synthesized in pipe mode, so the report output is grouped if there's group defined in record:

  #                 Overhead  Command          Shared    ...
  # ........................  ...............  .......
  #
       7.57%   0.16%   0.30%  swapper          [kernel
       1.87%   3.15%   2.46%  offlineimap      libpyth
       1.33%   0.00%   0.00%  perf             [kernel

...

---
 tools/perf/util/header.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/header.c +1 -2
index 59fcc790c865..af9aaf28f976 100644
@@ -2587,7 +2587,7 @@ static const struct feature_ops feat_ops[HEADER_LAST_FEATURE] = {
        FEAT_OPR(NUMA_TOPOLOGY, numa_topology,  true),
        FEAT_OPN(BRANCH_STACK,  branch_stack,   false),
        FEAT_OPR(PMU_MAPPINGS,  pmu_mappings,   false),
-       FEAT_OPN(GROUP_DESC,    group_desc,     false),
+       FEAT_OPR(GROUP_DESC,    group_desc,     false),
        FEAT_OPN(AUXTRACE,      auxtrace,       false),
        FEAT_OPN(STAT,          stat,           false),
        FEAT_OPN(CACHE,         cache,          true),
--

2.17.1

#6 lore raw

Em Thu, Jul 19, 2018 at 08:17:03AM -0700, Stephane Eranian escreveu:

Quoted 20 lines

Hi Arnaldo,

Quoted 17 lines · Arnaldo Carvalho de Melo

Em Thu, Jul 12, 2018 at 11:18:05PM -0700, Stephane Eranian escreveu:

Quoted 14 lines

Hi Jiri,

Quoted 12 lines · Jiri Olsa
Quoted 8 lines · Stephane Eranian

Hi Jiri,

Quoted 5 lines · Jiri Olsa

Stephan reported, that pipe mode does not carry the group information and thus the piped report won't display the grouped output for following command:

Thanks for fixing this quickly.

could I have your tested/acked by?

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Applying, Stephane, please consider providing a

Sorry about that.

Just replaced the Acked-by with this one.

Thanks!

- Arnado

#7 lore raw
In reply to Jiri Olsa
perf tools: Synthesize GROUP_DESC feature in pipe mode
Commit-ID:  e8fedff1cc729fd227924305152ccc6f580e8c83
Gitweb:     https://git.kernel.org/tip/e8fedff1cc729fd227924305152ccc6f580e8c83
Author:     Jiri Olsa <[email protected]>
AuthorDate: Thu, 12 Jul 2018 15:52:02 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 24 Jul 2018 14:53:20 -0300

perf tools: Synthesize GROUP_DESC feature in pipe mode

Stephan reported, that pipe mode does not carry the group information and thus the piped report won't display the grouped output for following command:

  # perf record -e '{cycles,instructions,branches}' -a sleep 4 | perf report

It has no idea about the group setup, so it will display events separately:

  # Overhead  Command          Shared Object             ...
  # ........  ...............  .......................
  #
       6.71%  swapper          [kernel.kallsyms]
       2.28%  offlineimap      libpython2.7.so.1.0
       0.78%  perf             [kernel.kallsyms]

...

Fix GROUP_DESC feature record to be synthesized in pipe mode, so the report output is grouped if there are groups defined in record:

  #                 Overhead  Command          Shared    ...
  # ........................  ...............  .......
  #
       7.57%   0.16%   0.30%  swapper          [kernel
       1.87%   3.15%   2.46%  offlineimap      libpyth
       1.33%   0.00%   0.00%  perf             [kernel

...

---
 tools/perf/util/header.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/header.c +1 -1
index 653ff65aa2c3..5af58aac91ad 100644
@@ -2587,7 +2587,7 @@ static const struct feature_ops feat_ops[HEADER_LAST_FEATURE] = {
 	FEAT_OPR(NUMA_TOPOLOGY,	numa_topology,	true),
 	FEAT_OPN(BRANCH_STACK,	branch_stack,	false),
 	FEAT_OPR(PMU_MAPPINGS,	pmu_mappings,	false),
-	FEAT_OPN(GROUP_DESC,	group_desc,	false),
+	FEAT_OPR(GROUP_DESC,	group_desc,	false),
 	FEAT_OPN(AUXTRACE,	auxtrace,	false),
 	FEAT_OPN(STAT,		stat,		false),
 	FEAT_OPN(CACHE,		cache,		true),