Re: [PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries
On Fri, Jan 18, 2013 at 09:46:54AM -0800, Sukadev Bhattiprolu wrote: Jiri Olsa [jo...@redhat.com] wrote: SNIP + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + Linux Powerpc mailing list linuxppc-...@ozlabs.org + +Description: POWER-systems specific performance monitoring events + + A collection of performance monitoring events that may be + supported by the POWER CPU. These events can be monitored + using the 'perf(1)' tool. + + These events may not be supported by other CPUs. + + The contents of each file would look like: + + event=0x + + where 'N' is a hex digit and the number '0x' shows the + raw code for the perf event identified by the file's + basename. + + Further, multiple terms like 'event=0x' can be specified + and separated with comma. All available terms are defined in + the /sys/bus/event_source/devices/dev/format file. Acked-by: Jiri Olsa jo...@redhat.com thanks, jirka ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries
Jiri Olsa [jo...@redhat.com] wrote: | Maybe it'd worth to mention, that it does not need to be just 'event', | but anything from /sys/bus/event_source/devices/dev/format directory, | like | | The can be multiple terms like 'event=0x' specified | and separated with comma. All available terms are located | in /sys/bus/event_source/devices/dev/format file. | | Please feel free to rephrase or use proper English ;-) | | otherwise it's ok, | jirka Agree. Thanks for the review. Here is the updated patch. --- From 1e3cc6b3ef87f533985b10574af472361e39eecd Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Tue, 8 Jan 2013 22:31:49 -0800 Subject: [PATCH] perf: Document the ABI of perf sysfs entries This patchset addes two new sets of files to sysfs for POWER architecture. - perf event config format in /sys/devices/cpu/format/event - generic and POWER-specific perf events in /sys/devices/cpu/events/ The format of the first file is already documented in: sysfs-bus-event_source-devices-format Document the format of the second set of files '/sys/devices/cpu/events/*' which would also become part of the ABI. Changelog[v3.2]: (small changes to this one patch). [Jiri Olsa]: Mention that multiple event= like terms can be specified in the 'events' file. Changelog[v3.1]: (small changes to just this one patch). [Jiri Olsa]: Remove the documentation for the 'config format' file as it is already documented in 'Documentation/ABI/testing/'. [Jiri Olsa]: Move the documentation of 'events' also to 'testing' from 'stable'. Changelog[v3]: [Greg KH] Include ABI documentation. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- .../testing/sysfs-bus-event_source-devices-events | 62 1 files changed, 62 insertions(+), 0 deletions(-) delete mode 100644 Documentation/ABI/stable/sysfs-devices-cpu-events create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices-events diff --git a/Documentation/ABI/stable/sysfs-devices-cpu-events b/Documentation/ABI/stable/sysfs-devices-cpu-events deleted file mode 100644 index e69de29..000 diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events new file mode 100644 index 000..0adeb52 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events @@ -0,0 +1,62 @@ +What: /sys/devices/cpu/events/ + /sys/devices/cpu/events/branch-misses + /sys/devices/cpu/events/cache-references + /sys/devices/cpu/events/cache-misses + /sys/devices/cpu/events/stalled-cycles-frontend + /sys/devices/cpu/events/branch-instructions + /sys/devices/cpu/events/stalled-cycles-backend + /sys/devices/cpu/events/instructions + /sys/devices/cpu/events/cpu-cycles + +Date: 2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + +Description: Generic performance monitoring events + + A collection of performance monitoring events that may be + supported by many/most CPUs. These events can be monitored + using the 'perf(1)' tool. + + The contents of each file would look like: + + event=0x + + where 'N' is a hex digit and the number '0x' shows the + raw code for the perf event identified by the file's + basename. + + +What: /sys/devices/cpu/events/PM_LD_MISS_L1 + /sys/devices/cpu/events/PM_LD_REF_L1 + /sys/devices/cpu/events/PM_CYC + /sys/devices/cpu/events/PM_BRU_FIN + /sys/devices/cpu/events/PM_GCT_NOSLOT_CYC + /sys/devices/cpu/events/PM_BRU_MPRED + /sys/devices/cpu/events/PM_INST_CMPL + /sys/devices/cpu/events/PM_CMPLU_STALL + +Date: 2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + Linux Powerpc mailing list linuxppc-...@ozlabs.org + +Description: POWER-systems specific performance monitoring events + + A collection of performance monitoring events that may be + supported by the POWER CPU. These events can be monitored + using the 'perf(1)' tool. + + These events may not be supported by other CPUs. + + The contents of each file would look like: + + event=0x + + where 'N' is a hex digit and the number '0x' shows the + raw code for the perf event identified by the file's + basename. + + Further, multiple terms like 'event=0x' can be specified + and separated with comma.
Re: [PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries
Em Fri, Jan 18, 2013 at 09:46:54AM -0800, Sukadev Bhattiprolu escreveu: Jiri Olsa [jo...@redhat.com] wrote: | Maybe it'd worth to mention, that it does not need to be just 'event', | but anything from /sys/bus/event_source/devices/dev/format directory, | like | | The can be multiple terms like 'event=0x' specified | and separated with comma. All available terms are located | in /sys/bus/event_source/devices/dev/format file. | | Please feel free to rephrase or use proper English ;-) | | otherwise it's ok, | jirka Agree. Thanks for the review. Here is the updated patch. Ok, I'll wait for Jiri's final acked-by, then you can resubmit the patch series and I'll apply it to my perf/core branch. - Arnaldo ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries
On Wed, Jan 16, 2013 at 10:58:16AM -0800, Sukadev Bhattiprolu wrote: Jiri Olsa [jo...@redhat.com] wrote: | On Tue, Jan 15, 2013 at 03:57:59PM -0300, Arnaldo Carvalho de Melo wrote: | Em Wed, Jan 09, 2013 at 05:07:03PM -0800, Sukadev Bhattiprolu escreveu: | [PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries | | This patchset addes two new sets of files to sysfs: | | - generic and POWER-specific perf events in /sys/devices/cpu/events/ | - perf event config format in /sys/devices/cpu/format/event | | Document the format of these files which would become part of the ABI. | | Changelog[v3]: | [Greg KH] Include ABI documentation. | | Jiri, can I have your ack on this one too? | | hm, we already already 'format' definition but in testing section | (and we are missing 'events' definition there.. my bad) I see that file now ! I have removed that documentation from my patch. | | anyway, after reading Documentation/ABI/README looks like we | should go for 'testing' section with this as well.. stable | seems scary at this point ;-) Agree. Here is the updated patch. --- This patchset addes two new sets of files to sysfs for POWER architecture. - perf event config format in /sys/devices/cpu/format/event - generic and POWER-specific perf events in /sys/devices/cpu/events/ The format of the first file is already documented in: Documentation/ABI/testing/sysfs-bus-event_source-devices-format Document the format of the second set of files '/sys/devices/cpu/events/*' which would also become part of the ABI. Changelog[v3.1]: (small changes to this one patch). [Jiri Olsa]: Remove the documentation for the 'config format' file as it is already documented. [Jiri Olsa]: Move the documentation of 'events' also to 'testing/' Changelog[v3]: [Greg KH] Include ABI documentation. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- .../testing/sysfs-bus-event_source-devices-events | 58 1 files changed, 58 insertions(+), 0 deletions(-) delete mode 100644 Documentation/ABI/stable/sysfs-devices-cpu-events create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices-events diff --git a/Documentation/ABI/stable/sysfs-devices-cpu-events b/Documentation/ABI/stable/sysfs-devices-cpu-events deleted file mode 100644 index e69de29..000 diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events new file mode 100644 index 000..2c4081e --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events @@ -0,0 +1,58 @@ +What:/sys/devices/cpu/events/ + /sys/devices/cpu/events/branch-misses + /sys/devices/cpu/events/cache-references + /sys/devices/cpu/events/cache-misses + /sys/devices/cpu/events/stalled-cycles-frontend + /sys/devices/cpu/events/branch-instructions + /sys/devices/cpu/events/stalled-cycles-backend + /sys/devices/cpu/events/instructions + /sys/devices/cpu/events/cpu-cycles + +Date:2012/01/NN + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + +Description: Generic performance monitoring events + + A collection of performance monitoring events that may be + supported by many/most CPUs. These events can be monitored + using the 'perf(1)' tool. + + The contents of each file would look like: + + event=0x + + where 'N' is a hex digit and the number '0x' shows the + raw code for the perf event identified by the file's + basename. Maybe it'd worth to mention, that it does not need to be just 'event', but anything from /sys/bus/event_source/devices/dev/format directory, like The can be multiple terms like 'event=0x' specified and separated with comma. All available terms are located in /sys/bus/event_source/devices/dev/format file. Please feel free to rephrase or use proper English ;-) otherwise it's ok, jirka ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries
On Tue, Jan 15, 2013 at 03:57:59PM -0300, Arnaldo Carvalho de Melo wrote: Em Wed, Jan 09, 2013 at 05:07:03PM -0800, Sukadev Bhattiprolu escreveu: [PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries This patchset addes two new sets of files to sysfs: - generic and POWER-specific perf events in /sys/devices/cpu/events/ - perf event config format in /sys/devices/cpu/format/event Document the format of these files which would become part of the ABI. Changelog[v3]: [Greg KH] Include ABI documentation. Jiri, can I have your ack on this one too? hm, we already already 'format' definition but in testing section (and we are missing 'events' definition there.. my bad) anyway, after reading Documentation/ABI/README looks like we should go for 'testing' section with this as well.. stable seems scary at this point ;-) jirka Greg, all ok now? - Arnaldo Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- Documentation/ABI/stable/sysfs-devices-cpu-events | 54 + Documentation/ABI/stable/sysfs-devices-cpu-format | 27 ++ 2 files changed, 81 insertions(+), 0 deletions(-) create mode 100644 Documentation/ABI/stable/sysfs-devices-cpu-format diff --git a/Documentation/ABI/stable/sysfs-devices-cpu-events b/Documentation/ABI/stable/sysfs-devices-cpu-events index e69de29..f37d542 100644 --- a/Documentation/ABI/stable/sysfs-devices-cpu-events +++ b/Documentation/ABI/stable/sysfs-devices-cpu-events @@ -0,0 +1,54 @@ +What: /sys/devices/cpu/events/ + /sys/devices/cpu/events/branch-misses + /sys/devices/cpu/events/cache-references + /sys/devices/cpu/events/cache-misses + /sys/devices/cpu/events/stalled-cycles-frontend + /sys/devices/cpu/events/branch-instructions + /sys/devices/cpu/events/stalled-cycles-backend + /sys/devices/cpu/events/instructions + /sys/devices/cpu/events/cpu-cycles + +Date: 2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + +Description: Generic performance monitoring events + + A collection of performance monitoring events that may be + supported by many/most CPUs. These events can be monitored + using the 'perf(1)' tool. + + The contents of each file would look like: + + event=0x + + where 'N' is a hex digit. + + +What: /sys/devices/cpu/events/PM_LD_MISS_L1 + /sys/devices/cpu/events/PM_LD_REF_L1 + /sys/devices/cpu/events/PM_CYC + /sys/devices/cpu/events/PM_BRU_FIN + /sys/devices/cpu/events/PM_GCT_NOSLOT_CYC + /sys/devices/cpu/events/PM_BRU_MPRED + /sys/devices/cpu/events/PM_INST_CMPL + /sys/devices/cpu/events/PM_CMPLU_STALL + +Date: 2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + Linux Powerpc mailing list linuxppc-...@ozlabs.org + +Description: POWER specific performance monitoring events + + A collection of performance monitoring events that may be + supported by the POWER CPU. These events can be monitored + using the 'perf(1)' tool. + + These events may not be supported by other CPUs. + + The contents of each file would look like: + + event=0x + + where 'N' is a hex digit. diff --git a/Documentation/ABI/stable/sysfs-devices-cpu-format b/Documentation/ABI/stable/sysfs-devices-cpu-format new file mode 100644 index 000..b15cfb2 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-devices-cpu-format @@ -0,0 +1,27 @@ +What: /sys/devices/cpu/format/ + /sys/devices/cpu/format/event + +Date: 2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + +Description: Format of performance monitoring events + + Each CPU/architecture may use different format to represent + the perf event. The 'event' file describes the configuration + format of the performance monitoring event on the CPU/system. + + The contents of each file would look like: + + config:m-n + + where m and n are the starting and ending bits that are + used to represent the event. + + For example, on POWER, + + $ cat /sys/devices/cpu/format/event + config:0-20 + + meaning that POWER uses the first 20-bits to represent a perf + event. -- 1.7.1 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries
Jiri Olsa [jo...@redhat.com] wrote: | On Tue, Jan 15, 2013 at 03:57:59PM -0300, Arnaldo Carvalho de Melo wrote: | Em Wed, Jan 09, 2013 at 05:07:03PM -0800, Sukadev Bhattiprolu escreveu: | [PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries | | This patchset addes two new sets of files to sysfs: | | - generic and POWER-specific perf events in /sys/devices/cpu/events/ | - perf event config format in /sys/devices/cpu/format/event | | Document the format of these files which would become part of the ABI. | | Changelog[v3]: | [Greg KH] Include ABI documentation. | | Jiri, can I have your ack on this one too? | | hm, we already already 'format' definition but in testing section | (and we are missing 'events' definition there.. my bad) I see that file now ! I have removed that documentation from my patch. | | anyway, after reading Documentation/ABI/README looks like we | should go for 'testing' section with this as well.. stable | seems scary at this point ;-) Agree. Here is the updated patch. --- This patchset addes two new sets of files to sysfs for POWER architecture. - perf event config format in /sys/devices/cpu/format/event - generic and POWER-specific perf events in /sys/devices/cpu/events/ The format of the first file is already documented in: Documentation/ABI/testing/sysfs-bus-event_source-devices-format Document the format of the second set of files '/sys/devices/cpu/events/*' which would also become part of the ABI. Changelog[v3.1]: (small changes to this one patch). [Jiri Olsa]: Remove the documentation for the 'config format' file as it is already documented. [Jiri Olsa]: Move the documentation of 'events' also to 'testing/' Changelog[v3]: [Greg KH] Include ABI documentation. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- .../testing/sysfs-bus-event_source-devices-events | 58 1 files changed, 58 insertions(+), 0 deletions(-) delete mode 100644 Documentation/ABI/stable/sysfs-devices-cpu-events create mode 100644 Documentation/ABI/testing/sysfs-bus-event_source-devices-events diff --git a/Documentation/ABI/stable/sysfs-devices-cpu-events b/Documentation/ABI/stable/sysfs-devices-cpu-events deleted file mode 100644 index e69de29..000 diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events new file mode 100644 index 000..2c4081e --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events @@ -0,0 +1,58 @@ +What: /sys/devices/cpu/events/ + /sys/devices/cpu/events/branch-misses + /sys/devices/cpu/events/cache-references + /sys/devices/cpu/events/cache-misses + /sys/devices/cpu/events/stalled-cycles-frontend + /sys/devices/cpu/events/branch-instructions + /sys/devices/cpu/events/stalled-cycles-backend + /sys/devices/cpu/events/instructions + /sys/devices/cpu/events/cpu-cycles + +Date: 2012/01/NN + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + +Description: Generic performance monitoring events + + A collection of performance monitoring events that may be + supported by many/most CPUs. These events can be monitored + using the 'perf(1)' tool. + + The contents of each file would look like: + + event=0x + + where 'N' is a hex digit and the number '0x' shows the + raw code for the perf event identified by the file's + basename. + + +What: /sys/devices/cpu/events/PM_LD_MISS_L1 + /sys/devices/cpu/events/PM_LD_REF_L1 + /sys/devices/cpu/events/PM_CYC + /sys/devices/cpu/events/PM_BRU_FIN + /sys/devices/cpu/events/PM_GCT_NOSLOT_CYC + /sys/devices/cpu/events/PM_BRU_MPRED + /sys/devices/cpu/events/PM_INST_CMPL + /sys/devices/cpu/events/PM_CMPLU_STALL + +Date: 2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + Linux Powerpc mailing list linuxppc-...@ozlabs.org + +Description: POWER-systems specific performance monitoring events + + A collection of performance monitoring events that may be + supported by the POWER CPU. These events can be monitored + using the 'perf(1)' tool. + + These events may not be supported by other CPUs. + + The contents of each file would look like: + + event=0x + + where 'N' is a hex digit and the number '0x' shows the + raw code for the perf event identified by the file's + basename. -- 1.7.1
Re: [PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries
Em Wed, Jan 09, 2013 at 05:07:03PM -0800, Sukadev Bhattiprolu escreveu: [PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries This patchset addes two new sets of files to sysfs: - generic and POWER-specific perf events in /sys/devices/cpu/events/ - perf event config format in /sys/devices/cpu/format/event Document the format of these files which would become part of the ABI. Changelog[v3]: [Greg KH] Include ABI documentation. Jiri, can I have your ack on this one too? Greg, all ok now? - Arnaldo Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- Documentation/ABI/stable/sysfs-devices-cpu-events | 54 + Documentation/ABI/stable/sysfs-devices-cpu-format | 27 ++ 2 files changed, 81 insertions(+), 0 deletions(-) create mode 100644 Documentation/ABI/stable/sysfs-devices-cpu-format diff --git a/Documentation/ABI/stable/sysfs-devices-cpu-events b/Documentation/ABI/stable/sysfs-devices-cpu-events index e69de29..f37d542 100644 --- a/Documentation/ABI/stable/sysfs-devices-cpu-events +++ b/Documentation/ABI/stable/sysfs-devices-cpu-events @@ -0,0 +1,54 @@ +What:/sys/devices/cpu/events/ + /sys/devices/cpu/events/branch-misses + /sys/devices/cpu/events/cache-references + /sys/devices/cpu/events/cache-misses + /sys/devices/cpu/events/stalled-cycles-frontend + /sys/devices/cpu/events/branch-instructions + /sys/devices/cpu/events/stalled-cycles-backend + /sys/devices/cpu/events/instructions + /sys/devices/cpu/events/cpu-cycles + +Date:2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + +Description: Generic performance monitoring events + + A collection of performance monitoring events that may be + supported by many/most CPUs. These events can be monitored + using the 'perf(1)' tool. + + The contents of each file would look like: + + event=0x + + where 'N' is a hex digit. + + +What:/sys/devices/cpu/events/PM_LD_MISS_L1 + /sys/devices/cpu/events/PM_LD_REF_L1 + /sys/devices/cpu/events/PM_CYC + /sys/devices/cpu/events/PM_BRU_FIN + /sys/devices/cpu/events/PM_GCT_NOSLOT_CYC + /sys/devices/cpu/events/PM_BRU_MPRED + /sys/devices/cpu/events/PM_INST_CMPL + /sys/devices/cpu/events/PM_CMPLU_STALL + +Date:2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + Linux Powerpc mailing list linuxppc-...@ozlabs.org + +Description: POWER specific performance monitoring events + + A collection of performance monitoring events that may be + supported by the POWER CPU. These events can be monitored + using the 'perf(1)' tool. + + These events may not be supported by other CPUs. + + The contents of each file would look like: + + event=0x + + where 'N' is a hex digit. diff --git a/Documentation/ABI/stable/sysfs-devices-cpu-format b/Documentation/ABI/stable/sysfs-devices-cpu-format new file mode 100644 index 000..b15cfb2 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-devices-cpu-format @@ -0,0 +1,27 @@ +What:/sys/devices/cpu/format/ + /sys/devices/cpu/format/event + +Date:2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + +Description: Format of performance monitoring events + + Each CPU/architecture may use different format to represent + the perf event. The 'event' file describes the configuration + format of the performance monitoring event on the CPU/system. + + The contents of each file would look like: + + config:m-n + + where m and n are the starting and ending bits that are + used to represent the event. + + For example, on POWER, + + $ cat /sys/devices/cpu/format/event + config:0-20 + + meaning that POWER uses the first 20-bits to represent a perf + event. -- 1.7.1 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries
On Tue, Jan 15, 2013 at 03:57:59PM -0300, Arnaldo Carvalho de Melo wrote: Em Wed, Jan 09, 2013 at 05:07:03PM -0800, Sukadev Bhattiprolu escreveu: [PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries This patchset addes two new sets of files to sysfs: - generic and POWER-specific perf events in /sys/devices/cpu/events/ - perf event config format in /sys/devices/cpu/format/event Document the format of these files which would become part of the ABI. Changelog[v3]: [Greg KH] Include ABI documentation. Jiri, can I have your ack on this one too? Greg, all ok now? No objection from me, thanks. greg k-h ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries
This patchset addes two new sets of files to sysfs: - generic and POWER-specific perf events in /sys/devices/cpu/events/ - perf event config format in /sys/devices/cpu/format/event Document the format of these files which would become part of the ABI. Changelog[v3]: [Greg KH] Include ABI documentation. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- Documentation/ABI/stable/sysfs-devices-cpu-events | 54 + Documentation/ABI/stable/sysfs-devices-cpu-format | 27 ++ 2 files changed, 81 insertions(+), 0 deletions(-) create mode 100644 Documentation/ABI/stable/sysfs-devices-cpu-format diff --git a/Documentation/ABI/stable/sysfs-devices-cpu-events b/Documentation/ABI/stable/sysfs-devices-cpu-events index e69de29..f37d542 100644 --- a/Documentation/ABI/stable/sysfs-devices-cpu-events +++ b/Documentation/ABI/stable/sysfs-devices-cpu-events @@ -0,0 +1,54 @@ +What: /sys/devices/cpu/events/ + /sys/devices/cpu/events/branch-misses + /sys/devices/cpu/events/cache-references + /sys/devices/cpu/events/cache-misses + /sys/devices/cpu/events/stalled-cycles-frontend + /sys/devices/cpu/events/branch-instructions + /sys/devices/cpu/events/stalled-cycles-backend + /sys/devices/cpu/events/instructions + /sys/devices/cpu/events/cpu-cycles + +Date: 2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + +Description: Generic performance monitoring events + + A collection of performance monitoring events that may be + supported by many/most CPUs. These events can be monitored + using the 'perf(1)' tool. + + The contents of each file would look like: + + event=0x + + where 'N' is a hex digit. + + +What: /sys/devices/cpu/events/PM_LD_MISS_L1 + /sys/devices/cpu/events/PM_LD_REF_L1 + /sys/devices/cpu/events/PM_CYC + /sys/devices/cpu/events/PM_BRU_FIN + /sys/devices/cpu/events/PM_GCT_NOSLOT_CYC + /sys/devices/cpu/events/PM_BRU_MPRED + /sys/devices/cpu/events/PM_INST_CMPL + /sys/devices/cpu/events/PM_CMPLU_STALL + +Date: 2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + Linux Powerpc mailing list linuxppc-...@ozlabs.org + +Description: POWER specific performance monitoring events + + A collection of performance monitoring events that may be + supported by the POWER CPU. These events can be monitored + using the 'perf(1)' tool. + + These events may not be supported by other CPUs. + + The contents of each file would look like: + + event=0x + + where 'N' is a hex digit. diff --git a/Documentation/ABI/stable/sysfs-devices-cpu-format b/Documentation/ABI/stable/sysfs-devices-cpu-format new file mode 100644 index 000..b15cfb2 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-devices-cpu-format @@ -0,0 +1,27 @@ +What: /sys/devices/cpu/format/ + /sys/devices/cpu/format/event + +Date: 2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + +Description: Format of performance monitoring events + + Each CPU/architecture may use different format to represent + the perf event. The 'event' file describes the configuration + format of the performance monitoring event on the CPU/system. + + The contents of each file would look like: + + config:m-n + + where m and n are the starting and ending bits that are + used to represent the event. + + For example, on POWER, + + $ cat /sys/devices/cpu/format/event + config:0-20 + + meaning that POWER uses the first 20-bits to represent a perf + event. -- 1.7.1 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries
[PATCH 6/6][v3] perf: Document the ABI of perf sysfs entries This patchset addes two new sets of files to sysfs: - generic and POWER-specific perf events in /sys/devices/cpu/events/ - perf event config format in /sys/devices/cpu/format/event Document the format of these files which would become part of the ABI. Changelog[v3]: [Greg KH] Include ABI documentation. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- Documentation/ABI/stable/sysfs-devices-cpu-events | 54 + Documentation/ABI/stable/sysfs-devices-cpu-format | 27 ++ 2 files changed, 81 insertions(+), 0 deletions(-) create mode 100644 Documentation/ABI/stable/sysfs-devices-cpu-format diff --git a/Documentation/ABI/stable/sysfs-devices-cpu-events b/Documentation/ABI/stable/sysfs-devices-cpu-events index e69de29..f37d542 100644 --- a/Documentation/ABI/stable/sysfs-devices-cpu-events +++ b/Documentation/ABI/stable/sysfs-devices-cpu-events @@ -0,0 +1,54 @@ +What: /sys/devices/cpu/events/ + /sys/devices/cpu/events/branch-misses + /sys/devices/cpu/events/cache-references + /sys/devices/cpu/events/cache-misses + /sys/devices/cpu/events/stalled-cycles-frontend + /sys/devices/cpu/events/branch-instructions + /sys/devices/cpu/events/stalled-cycles-backend + /sys/devices/cpu/events/instructions + /sys/devices/cpu/events/cpu-cycles + +Date: 2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + +Description: Generic performance monitoring events + + A collection of performance monitoring events that may be + supported by many/most CPUs. These events can be monitored + using the 'perf(1)' tool. + + The contents of each file would look like: + + event=0x + + where 'N' is a hex digit. + + +What: /sys/devices/cpu/events/PM_LD_MISS_L1 + /sys/devices/cpu/events/PM_LD_REF_L1 + /sys/devices/cpu/events/PM_CYC + /sys/devices/cpu/events/PM_BRU_FIN + /sys/devices/cpu/events/PM_GCT_NOSLOT_CYC + /sys/devices/cpu/events/PM_BRU_MPRED + /sys/devices/cpu/events/PM_INST_CMPL + /sys/devices/cpu/events/PM_CMPLU_STALL + +Date: 2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + Linux Powerpc mailing list linuxppc-...@ozlabs.org + +Description: POWER specific performance monitoring events + + A collection of performance monitoring events that may be + supported by the POWER CPU. These events can be monitored + using the 'perf(1)' tool. + + These events may not be supported by other CPUs. + + The contents of each file would look like: + + event=0x + + where 'N' is a hex digit. diff --git a/Documentation/ABI/stable/sysfs-devices-cpu-format b/Documentation/ABI/stable/sysfs-devices-cpu-format new file mode 100644 index 000..b15cfb2 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-devices-cpu-format @@ -0,0 +1,27 @@ +What: /sys/devices/cpu/format/ + /sys/devices/cpu/format/event + +Date: 2013/01/08 + +Contact: Linux kernel mailing list linux-ker...@vger.kernel.org + +Description: Format of performance monitoring events + + Each CPU/architecture may use different format to represent + the perf event. The 'event' file describes the configuration + format of the performance monitoring event on the CPU/system. + + The contents of each file would look like: + + config:m-n + + where m and n are the starting and ending bits that are + used to represent the event. + + For example, on POWER, + + $ cat /sys/devices/cpu/format/event + config:0-20 + + meaning that POWER uses the first 20-bits to represent a perf + event. -- 1.7.1 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev