[PATCH v3 0/8] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-02-29 Thread Kajol Jain
ing 0 to event_count value. Suggested by: Sukadev Bhattiprolu - Apply tool side changes require to replace "?" on Jiri's flex patch series and made all require changes to make it compatible with added flex change. v1 -> v2 - Rename hv-24x7 metric json file as nest_metrics.js

[PATCH v3 1/8] powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run

2020-02-29 Thread Kajol Jain
4 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.000645920204 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=0/ 4.000645920 61 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.284169997 22 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01

[PATCH v3 3/8] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

2020-02-29 Thread Kajol Jain
To expose the system dependent parameter like total number of sockets and numbers of chips per socket, patch adds two sysfs files. "sockets" and "chips" are added to /sys/devices/hv_24x7/interface/ of the "hv_24x7" pmu. Signed-off-by: Kajol Jain --- ar

[PATCH v3 2/8] powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor details

2020-02-29 Thread Kajol Jain
socket. Rtas_call with token "PROCESSOR_MODULE_INFO" is used to get these values. Sub-sequent patch exports these values via sysfs. Patch also make these parameters default to 1. Signed-off-by: Kajol Jain --- arch/powerpc/perf/hv-24x7.c | 72 ar

[PATCH v3 4/8] Documentation/ABI: Add ABI documentation for chips and sockets

2020-02-29 Thread Kajol Jain
Add documentation for the following sysfs files: /sys/devices/hv_24x7/interface/chips, /sys/devices/hv_24x7/interface/sockets Signed-off-by: Kajol Jain --- .../testing/sysfs-bus-event_source-devices-hv_24x7 | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Documentation/ABI

[PATCH v3 5/8] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration

2020-02-29 Thread Kajol Jain
chips per sockets or number of sockets might change. So, it needs to be re-initialized otherwise, these values corresponds to previous system values. This patch adds a call to 'read_sys_info_pseries()' from 'post-mobility_fixup()' to re-init the physsockets and physchips value

[PATCH v3 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-02-29 Thread Kajol Jain
Function 'arch_get_runtimeparam' implemented in header.c which extract number of sockets from sysfs file "sockets" under "/sys/devices/hv_24x7/interface/". Signed-off-by: Kajol Jain --- tools/perf/arch/powerpc/util/header.c | 47 +++ tools/perf/util/expr

[PATCH v3 7/8] tools/perf: Enable Hz/hz prinitg for --metric-only option

2020-02-29 Thread Kajol Jain
Commit 54b5091606c18 ("perf stat: Implement --metric-only mode") added function 'valid_only_metric()' which drops "Hz" or "hz", if it is part of "ScaleUnit". This patch enable it since hv_24x7 supports couple of frequency events. Signed-off-by: K

[PATCH v3 0/8] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-02-29 Thread Kajol Jain
ing 0 to event_count value. Suggested by: Sukadev Bhattiprolu - Apply tool side changes require to replace "?" on Jiri's flex patch series and made all require changes to make it compatible with added flex change. v1 -> v2 - Rename hv-24x7 metric json file as nest_metrics.js

[PATCH v3 1/8] powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run

2020-02-29 Thread Kajol Jain
4 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.000645920204 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=0/ 4.000645920 61 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.284169997 22 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01

[PATCH v3 2/8] powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor details

2020-02-29 Thread Kajol Jain
socket. Rtas_call with token "PROCESSOR_MODULE_INFO" is used to get these values. Sub-sequent patch exports these values via sysfs. Patch also make these parameters default to 1. Signed-off-by: Kajol Jain --- arch/powerpc/perf/hv-24x7.c | 72 ar

[PATCH v3 3/8] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

2020-02-29 Thread Kajol Jain
To expose the system dependent parameter like total number of sockets and numbers of chips per socket, patch adds two sysfs files. "sockets" and "chips" are added to /sys/devices/hv_24x7/interface/ of the "hv_24x7" pmu. Signed-off-by: Kajol Jain --- ar

[PATCH v3 4/8] Documentation/ABI: Add ABI documentation for chips and sockets

2020-02-29 Thread Kajol Jain
Add documentation for the following sysfs files: /sys/devices/hv_24x7/interface/chips, /sys/devices/hv_24x7/interface/sockets Signed-off-by: Kajol Jain --- .../testing/sysfs-bus-event_source-devices-hv_24x7 | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Documentation/ABI

[PATCH v3 5/8] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration

2020-02-29 Thread Kajol Jain
chips per sockets or number of sockets might change. So, it needs to be re-initialized otherwise, these values corresponds to previous system values. This patch adds a call to 'read_sys_info_pseries()' from 'post-mobility_fixup()' to re-init the physsockets and physchips value

[PATCH v3 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-02-29 Thread Kajol Jain
Function 'arch_get_runtimeparam' implemented in header.c which extract number of sockets from sysfs file "sockets" under "/sys/devices/hv_24x7/interface/". Signed-off-by: Kajol Jain --- tools/perf/arch/powerpc/util/header.c | 47 +++ tools/perf/util/expr

[PATCH v3 7/8] tools/perf: Enable Hz/hz prinitg for --metric-only option

2020-02-29 Thread Kajol Jain
Commit 54b5091606c18 ("perf stat: Implement --metric-only mode") added function 'valid_only_metric()' which drops "Hz" or "hz", if it is part of "ScaleUnit". This patch enable it since hv_24x7 supports couple of frequency events. Signed-off-by: K

[PATCH v3 8/8] perf/tools/pmu-events/powerpc: Add hv_24x7 socket/chip level metric events

2020-02-29 Thread Kajol Jain
2.3 Signed-off-by: Kajol Jain --- .../arch/powerpc/power9/nest_metrics.json | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json diff --git a/tools/perf/pmu-events/arch/powerpc/power9

[PATCH v4 0/8] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-03-08 Thread Kajol Jain
ot; on Jiri's flex patch series and made all require changes to make it compatible with added flex change. v1 -> v2 - Rename hv-24x7 metric json file as nest_metrics.json Kajol Jain (8): powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run pow

[PATCH v4 1/8] powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run

2020-03-08 Thread Kajol Jain
4 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.000645920204 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=0/ 4.000645920 61 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.284169997 22 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01

[PATCH v4 2/8] powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor details

2020-03-08 Thread Kajol Jain
socket. Rtas_call with token "PROCESSOR_MODULE_INFO" is used to get these values. Sub-sequent patch exports these values via sysfs. Patch also make these parameters default to 1. Signed-off-by: Kajol Jain --- arch/powerpc/perf/hv-24x7.c | 72 ar

[PATCH v4 3/8] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

2020-03-08 Thread Kajol Jain
To expose the system dependent parameter like total number of sockets and numbers of chips per socket, patch adds two sysfs files. "sockets" and "chips" are added to /sys/devices/hv_24x7/interface/ of the "hv_24x7" pmu. Signed-off-by: Kajol Jain --- ar

[PATCH v4 4/8] Documentation/ABI: Add ABI documentation for chips and sockets

2020-03-08 Thread Kajol Jain
Add documentation for the following sysfs files: /sys/devices/hv_24x7/interface/chips, /sys/devices/hv_24x7/interface/sockets Signed-off-by: Kajol Jain --- .../testing/sysfs-bus-event_source-devices-hv_24x7 | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Documentation/ABI

[PATCH v4 5/8] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration

2020-03-08 Thread Kajol Jain
chips per sockets or number of sockets might change. So, it needs to be re-initialized otherwise, these values corresponds to previous system values. This patch adds a call to 'read_sys_info_pseries()' from 'post-mobility_fixup()' to re-init the physsockets and physchips value

[PATCH v4 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-08 Thread Kajol Jain
Function 'arch_get_runtimeparam' implemented in header.c which extract number of sockets from sysfs file "sockets" under "/sys/devices/hv_24x7/interface/". Signed-off-by: Kajol Jain --- tools/perf/arch/powerpc/util/header.c | 22 + tools/perf/util/expr.h

[PATCH v4 7/8] tools/perf: Enable Hz/hz prinitg for --metric-only option

2020-03-08 Thread Kajol Jain
Commit 54b5091606c18 ("perf stat: Implement --metric-only mode") added function 'valid_only_metric()' which drops "Hz" or "hz", if it is part of "ScaleUnit". This patch enable it since hv_24x7 supports couple of frequency events. Signed-off-by: K

[PATCH v4 8/8] perf/tools/pmu-events/powerpc: Add hv_24x7 socket/chip level metric events

2020-03-08 Thread Kajol Jain
2.3 Signed-off-by: Kajol Jain --- .../arch/powerpc/power9/nest_metrics.json | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json diff --git a/tools/perf/pmu-events/arch/powerpc/power9

[PATCH v5 00/11] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-03-16 Thread Kajol Jain
ri's flex patch series and made all require changes to make it compatible with added flex change. v1 -> v2 - Rename hv-24x7 metric json file as nest_metrics.json Jiri Olsa (2): perf expr: Add expr_ prefix for parse_ctx and parse_id perf expr: Add expr_scanner_ctx object Kajol Jain (9): pow

[PATCH v5 01/11] perf expr: Add expr_ prefix for parse_ctx and parse_id

2020-03-16 Thread Kajol Jain
From: Jiri Olsa Adding expr_ prefix for parse_ctx and parse_id, to straighten out the expr* namespace. There's no functional change. Signed-off-by: Jiri Olsa --- tools/perf/tests/expr.c | 4 ++-- tools/perf/util/expr.c| 10 +- tools/perf/util/expr.h| 12 ++--

[PATCH v5 02/11] perf expr: Add expr_scanner_ctx object

2020-03-16 Thread Kajol Jain
From: Jiri Olsa Adding expr_scanner_ctx object to hold user data for the expr scanner. Currently it holds only start_token, Kajol Jain will use it to hold 24x7 runtime param. Signed-off-by: Jiri Olsa --- tools/perf/util/expr.c | 6 -- tools/perf/util/expr.h | 4 tools/perf/util

[PATCH v5 03/11] powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run

2020-03-16 Thread Kajol Jain
4 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.000645920204 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=0/ 4.000645920 61 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.284169997 22 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01

[PATCH v5 04/11] powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor details

2020-03-16 Thread Kajol Jain
socket. Rtas_call with token "PROCESSOR_MODULE_INFO" is used to get these values. Sub-sequent patch exports these values via sysfs. Patch also make these parameters default to 1. Signed-off-by: Kajol Jain --- arch/powerpc/perf/hv-24x7.c | 72 ar

[PATCH v5 05/11] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

2020-03-16 Thread Kajol Jain
To expose the system dependent parameter like total number of sockets and numbers of chips per socket, patch adds two sysfs files. "sockets" and "chips" are added to /sys/devices/hv_24x7/interface/ of the "hv_24x7" pmu. Signed-off-by: Kajol Jain --- ar

[PATCH v5 06/11] Documentation/ABI: Add ABI documentation for chips and sockets

2020-03-16 Thread Kajol Jain
Add documentation for the following sysfs files: /sys/devices/hv_24x7/interface/chips, /sys/devices/hv_24x7/interface/sockets Signed-off-by: Kajol Jain --- .../testing/sysfs-bus-event_source-devices-hv_24x7 | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Documentation/ABI

[PATCH v5 07/11] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration

2020-03-16 Thread Kajol Jain
chips per sockets or number of sockets might change. So, it needs to be re-initialized otherwise, these values corresponds to previous system values. This patch adds a call to 'read_sys_info_pseries()' from 'post-mobility_fixup()' to re-init the physsockets and physchips value

[PATCH v5 08/11] perf/tools: Refactoring metricgroup__add_metric function

2020-03-16 Thread Kajol Jain
This patch refactor metricgroup__add_metric function where some part of it move to function metricgroup__add_metric_param. No logic change. Signed-off-by: Kajol Jain --- tools/perf/util/metricgroup.c | 63 +-- 1 file changed, 38 insertions(+), 25 deletions

[PATCH v5 09/11] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-16 Thread Kajol Jain
is requested. Function 'arch_get_runtimeparam' implemented in header.c which extract number of sockets from sysfs file "sockets" under "/sys/devices/hv_24x7/interface/". Signed-off-by: Kajol Jain --- tools/perf/arch/powerpc/util/header.c | 10 tools/perf/tests/expr

[PATCH v5 10/11] tools/perf: Enable Hz/hz prinitg for --metric-only option

2020-03-16 Thread Kajol Jain
Commit 54b5091606c18 ("perf stat: Implement --metric-only mode") added function 'valid_only_metric()' which drops "Hz" or "hz", if it is part of "ScaleUnit". This patch enable it since hv_24x7 supports couple of frequency events. Signed-off-by: K

[PATCH v5 11/11] perf/tools/pmu-events/powerpc: Add hv_24x7 socket/chip level metric events

2020-03-16 Thread Kajol Jain
2.3 Signed-off-by: Kajol Jain --- .../arch/powerpc/power9/nest_metrics.json | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json diff --git a/tools/perf/pmu-events/arch/powerpc/power9

[PATCH v6 00/11] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-03-20 Thread Kajol Jain
then adding 0 to event_count value. Suggested by: Sukadev Bhattiprolu - Apply tool side changes require to replace "?" on Jiri's flex patch series and made all require changes to make it compatible with added flex change. v1 -> v2 - Rename hv-24x7 metric json file as nest_me

[PATCH v6 01/11] perf expr: Add expr_ prefix for parse_ctx and parse_id

2020-03-20 Thread Kajol Jain
From: Jiri Olsa Adding expr_ prefix for parse_ctx and parse_id, to straighten out the expr* namespace. There's no functional change. Signed-off-by: Jiri Olsa --- tools/perf/tests/expr.c | 4 ++-- tools/perf/util/expr.c| 10 +- tools/perf/util/expr.h| 12 ++--

[PATCH v6 02/11] perf expr: Add expr_scanner_ctx object

2020-03-20 Thread Kajol Jain
From: Jiri Olsa Adding expr_scanner_ctx object to hold user data for the expr scanner. Currently it holds only start_token, Kajol Jain will use it to hold 24x7 runtime param. Signed-off-by: Jiri Olsa --- tools/perf/util/expr.c | 6 -- tools/perf/util/expr.h | 4 tools/perf/util

[PATCH v6 03/11] powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run

2020-03-20 Thread Kajol Jain
4 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.000645920204 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=0/ 4.000645920 61 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.284169997 22 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01

[PATCH v6 04/11] powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor details

2020-03-20 Thread Kajol Jain
socket. Rtas_call with token "PROCESSOR_MODULE_INFO" is used to get these values. Sub-sequent patch exports these values via sysfs. Patch also make these parameters default to 1. Signed-off-by: Kajol Jain --- arch/powerpc/perf/hv-24x7.c | 72 ar

[PATCH v6 05/11] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

2020-03-20 Thread Kajol Jain
To expose the system dependent parameter like total number of sockets and numbers of chips per socket, patch adds two sysfs files. "sockets" and "chips" are added to /sys/devices/hv_24x7/interface/ of the "hv_24x7" pmu. Signed-off-by: Kajol Jain --- ar

[PATCH v6 06/11] Documentation/ABI: Add ABI documentation for chips and sockets

2020-03-20 Thread Kajol Jain
Add documentation for the following sysfs files: /sys/devices/hv_24x7/interface/chips, /sys/devices/hv_24x7/interface/sockets Signed-off-by: Kajol Jain --- .../testing/sysfs-bus-event_source-devices-hv_24x7 | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Documentation/ABI

[PATCH v6 07/11] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration

2020-03-20 Thread Kajol Jain
chips per sockets or number of sockets might change. So, it needs to be re-initialized otherwise, these values corresponds to previous system values. This patch adds a call to 'read_sys_info_pseries()' from 'post-mobility_fixup()' to re-init the physsockets and physchips value

[PATCH v6 10/11] tools/perf: Enable Hz/hz prinitg for --metric-only option

2020-03-20 Thread Kajol Jain
Commit 54b5091606c18 ("perf stat: Implement --metric-only mode") added function 'valid_only_metric()' which drops "Hz" or "hz", if it is part of "ScaleUnit". This patch enable it since hv_24x7 supports couple of frequency events. Signed-off-by: K

[PATCH v6 08/11] perf/tools: Refactoring metricgroup__add_metric function

2020-03-20 Thread Kajol Jain
This patch refactor metricgroup__add_metric function where some part of it move to function metricgroup__add_metric_param. No logic change. Signed-off-by: Kajol Jain --- tools/perf/util/metricgroup.c | 64 +-- 1 file changed, 39 insertions(+), 25 deletions

[PATCH v6 11/11] perf/tools/pmu-events/powerpc: Add hv_24x7 socket/chip level metric events

2020-03-20 Thread Kajol Jain
2.3 Signed-off-by: Kajol Jain --- .../arch/powerpc/power9/nest_metrics.json | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json diff --git a/tools/perf/pmu-events/arch/powerpc/power9

[PATCH v6 09/11] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-20 Thread Kajol Jain
lly I am trying to extract it from metric name itself. Because otherwise it gonna point to last updated value present in runtime_param. And gonna match for that value only. Signed-off-by: Kajol Jain --- tools/perf/arch/powerpc/util/header.c | 8 ++ tools/perf/tests/expr.c | 8 +++--

[PATCH v7 0/5] powerpc/hv-24x7: Expose chip/sockets info to add json file metric support for the hv_24x7 socket/chip level events

2020-03-26 Thread Kajol Jain
eries=164769 Changelog: v6 -> v7 - Split patchset into two patch series, one with kernel changes and another with perf tool side changes. This pachset contain all kernel side changes. Kajol Jain (5): powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run

[PATCH v7 1/5] powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run

2020-03-26 Thread Kajol Jain
4 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.000645920204 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=0/ 4.000645920 61 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.284169997 22 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01

[PATCH v7 2/5] powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor details

2020-03-26 Thread Kajol Jain
socket. Rtas_call with token "PROCESSOR_MODULE_INFO" is used to get these values. Sub-sequent patch exports these values via sysfs. Patch also make these parameters default to 1. Signed-off-by: Kajol Jain --- arch/powerpc/perf/hv-24x7.c | 72 ar

[PATCH v7 3/5] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

2020-03-26 Thread Kajol Jain
To expose the system dependent parameter like total number of sockets and numbers of chips per socket, patch adds two sysfs files. "sockets" and "chips" are added to /sys/devices/hv_24x7/interface/ of the "hv_24x7" pmu. Signed-off-by: Kajol Jain --- ar

[PATCH v7 4/5] Documentation/ABI: Add ABI documentation for chips and sockets

2020-03-26 Thread Kajol Jain
Add documentation for the following sysfs files: /sys/devices/hv_24x7/interface/chips, /sys/devices/hv_24x7/interface/sockets Signed-off-by: Kajol Jain --- .../testing/sysfs-bus-event_source-devices-hv_24x7 | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Documentation/ABI

[PATCH v7 5/5] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration

2020-03-26 Thread Kajol Jain
chips per sockets or number of sockets might change. So, it needs to be re-initialized otherwise, these values corresponds to previous system values. This patch adds a call to 'read_sys_info_pseries()' from 'post-mobility_fixup()' to re-init the physsockets and physchips value

[PATCH v7 0/6] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-03-27 Thread Kajol Jain
r then adding 0 to event_count value. Suggested by: Sukadev Bhattiprolu - Apply tool side changes require to replace "?" on Jiri's flex patch series and made all require changes to make it compatible with added flex change. v1 -> v2 - Rename hv-24x7 metric json file as nes

[PATCH v7 1/6] perf expr: Add expr_ prefix for parse_ctx and parse_id

2020-03-27 Thread Kajol Jain
From: Jiri Olsa Adding expr_ prefix for parse_ctx and parse_id, to straighten out the expr* namespace. There's no functional change. Signed-off-by: Jiri Olsa --- tools/perf/tests/expr.c | 4 ++-- tools/perf/util/expr.c| 10 +- tools/perf/util/expr.h| 12 ++--

[PATCH v7 2/6] perf expr: Add expr_scanner_ctx object

2020-03-27 Thread Kajol Jain
From: Jiri Olsa Adding expr_scanner_ctx object to hold user data for the expr scanner. Currently it holds only start_token, Kajol Jain will use it to hold 24x7 runtime param. Signed-off-by: Jiri Olsa --- tools/perf/util/expr.c | 6 -- tools/perf/util/expr.h | 4 tools/perf/util

[PATCH v7 3/6] perf/tools: Refactoring metricgroup__add_metric function

2020-03-27 Thread Kajol Jain
This patch refactor metricgroup__add_metric function where some part of it move to function metricgroup__add_metric_param. No logic change. Signed-off-by: Kajol Jain --- tools/perf/util/metricgroup.c | 61 +-- 1 file changed, 36 insertions(+), 25 deletions

[PATCH v7 4/6] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-27 Thread Kajol Jain
01867 9,366,134 hv_24x7/pm_pb_cyc,chip=1/ # 2.3 GHz PowerBUS_Frequency_1 2.000314878 9,365,868 hv_24x7/pm_pb_cyc,chip=0/ # 2.3 GHz PowerBUS_Frequency_0 2.000314878 9,366,092 hv_24x7/pm_pb_cyc,chip=1/ # 2.3 GHz PowerBUS_Frequency_1 So, her

[PATCH v7 5/6] tools/perf: Enable Hz/hz prinitg for --metric-only option

2020-03-27 Thread Kajol Jain
Commit 54b5091606c18 ("perf stat: Implement --metric-only mode") added function 'valid_only_metric()' which drops "Hz" or "hz", if it is part of "ScaleUnit". This patch enable it since hv_24x7 supports couple of frequency events. Signed-off-by: K

[PATCH v7 6/6] perf/tools/pmu-events/powerpc: Add hv_24x7 socket/chip level metric events

2020-03-27 Thread Kajol Jain
2.3 Signed-off-by: Kajol Jain --- .../arch/powerpc/power9/nest_metrics.json | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json diff --git a/tools/perf/pmu-events/arch/powerpc/power9

[PATCH v8 0/7] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-04-01 Thread Kajol Jain
ll require changes to make it compatible with added flex change. v1 -> v2 - Rename hv-24x7 metric json file as nest_metrics.json Jiri Olsa (2): perf expr: Add expr_ prefix for parse_ctx and parse_id perf expr: Add expr_scanner_ctx object Kajol Jain (5): perf/tools: Refactoring metricg

[PATCH v8 1/7] perf expr: Add expr_ prefix for parse_ctx and parse_id

2020-04-01 Thread Kajol Jain
From: Jiri Olsa Adding expr_ prefix for parse_ctx and parse_id, to straighten out the expr* namespace. There's no functional change. Signed-off-by: Jiri Olsa --- tools/perf/tests/expr.c | 4 ++-- tools/perf/util/expr.c| 10 +- tools/perf/util/expr.h| 12 ++--

[PATCH v8 2/7] perf expr: Add expr_scanner_ctx object

2020-04-01 Thread Kajol Jain
From: Jiri Olsa Adding expr_scanner_ctx object to hold user data for the expr scanner. Currently it holds only start_token, Kajol Jain will use it to hold 24x7 runtime param. Signed-off-by: Jiri Olsa --- tools/perf/util/expr.c | 6 -- tools/perf/util/expr.h | 4 tools/perf/util

[PATCH v8 3/7] perf/tools: Refactoring metricgroup__add_metric function

2020-04-01 Thread Kajol Jain
This patch refactor metricgroup__add_metric function where some part of it move to function metricgroup__add_metric_param. No logic change. Signed-off-by: Kajol Jain --- tools/perf/util/metricgroup.c | 60 --- 1 file changed, 35 insertions(+), 25 deletions

[PATCH v8 4/7] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-04-01 Thread Kajol Jain
01867 9,366,134 hv_24x7/pm_pb_cyc,chip=1/ # 2.3 GHz PowerBUS_Frequency_1 2.000314878 9,365,868 hv_24x7/pm_pb_cyc,chip=0/ # 2.3 GHz PowerBUS_Frequency_0 2.000314878 9,366,092 hv_24x7/pm_pb_cyc,chip=1/ # 2.3 GHz PowerBUS_Frequency_1 So, her

[PATCH v8 5/7] perf/tests/expr: Added test for runtime param in metric expression

2020-04-01 Thread Kajol Jain
Added test case for parsing "?" in metric expression. Signed-off-by: Kajol Jain --- tools/perf/tests/expr.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/perf/tests/expr.c b/tools/perf/tests/expr.c index 516504cf0ea5..f9e8e5628836 100644 --- a/tools/perf/tests/ex

[PATCH v8 6/7] tools/perf: Enable Hz/hz prinitg for --metric-only option

2020-04-01 Thread Kajol Jain
Commit 54b5091606c18 ("perf stat: Implement --metric-only mode") added function 'valid_only_metric()' which drops "Hz" or "hz", if it is part of "ScaleUnit". This patch enable it since hv_24x7 supports couple of frequency events. Signed-off-by: K

[PATCH v8 7/7] perf/tools/pmu-events/powerpc: Add hv_24x7 socket/chip level metric events

2020-04-01 Thread Kajol Jain
2.3 Signed-off-by: Kajol Jain --- .../arch/powerpc/power9/nest_metrics.json | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 tools/perf/pmu-events/arch/powerpc/power9/nest_metrics.json diff --git a/tools/perf/pmu-events/arch/powerpc/power9

[PATCH v2] powerpc/kernel/sysfs: Add PMU_SYSFS config option to enable PMU SPRs sysfs file creation

2019-11-13 Thread Kajol Jain
ing for different architecture include: x86, mips, mips64, alpha, arm. And with book3s_32.config option. Signed-off-by: Kajol Jain --- arch/powerpc/kernel/sysfs.c| 21 + arch/powerpc/platforms/Kconfig.cputype | 8 2 files changed, 29 insertions(+) --- C

[PATCH] tools/perf/metricgroup: Fix printing event names of metric group with multiple events

2019-11-18 Thread Kajol Jain
43.0 20.7 0.0 0.0 0.0 Signed-off-by: Kajol Jain Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Cc: Jin Yao Cc: Arnaldo Carvalho de Melo Cc: Madhavan Srinivasan Cc: Anju T Sudhakar

[RESEND PATCH v2] powerpc/kernel/sysfs: Add PMU_SYSFS config option to enable PMU SPRs sysfs file creation

2019-12-04 Thread Kajol Jain
ing for different architecture include: x86, mips, mips64, alpha, arm. And with book3s_32.config option. Signed-off-by: Kajol Jain Reviewed-by: Madhavan Srinivasan Tested-by: Nageswara R Sastry Tested using the following different scenarios: 1. CONFIG_PERF_EVENT - enabled, CONFIG_PMU_SYSFS -

[PATCH v8 1/5] powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run

2020-05-06 Thread Kajol Jain
4 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.000645920204 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=0/ 4.000645920 61 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.284169997 22 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01

[PATCH v8 2/5] powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor details

2020-05-06 Thread Kajol Jain
socket. Rtas_call with token "PROCESSOR_MODULE_INFO" is used to get these values. Sub-sequent patch exports these values via sysfs. Patch also make these parameters default to 1. Signed-off-by: Kajol Jain --- arch/powerpc/include/asm/rtas.h | 1 + arch/powerpc/perf/hv-24x7.

[PATCH v8 3/5] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

2020-05-06 Thread Kajol Jain
To expose the system dependent parameter like total number of sockets and numbers of chips per socket, patch adds two sysfs files. "sockets" and "chips" are added to /sys/devices/hv_24x7/interface/ of the "hv_24x7" pmu. Signed-off-by: Kajol Jain --- ar

[PATCH v8 4/5] Documentation/ABI: Add ABI documentation for chips and sockets

2020-05-06 Thread Kajol Jain
Add documentation for the following sysfs files: /sys/devices/hv_24x7/interface/chipspersocket, /sys/devices/hv_24x7/interface/sockets, /sys/devices/hv_24x7/interface/coresperchip Signed-off-by: Kajol Jain --- .../sysfs-bus-event_source-devices-hv_24x7| 21 +++ 1 file

[PATCH v8 5/5] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration

2020-05-06 Thread Kajol Jain
chips per sockets or number of sockets might change. So, it needs to be re-initialized otherwise, these values corresponds to previous system values. This patch adds a call to 'read_sys_info_pseries()' from 'post-mobility_fixup()' to re-init the physsockets and physchips valu

[PATCH v8 0/5] powerpc/hv-24x7: Expose chip/sockets info to add json file metric support for the hv_24x7 socket/chip level events

2020-05-06 Thread Kajol Jain
set into two patch series, one with kernel changes and another with perf tool side changes. This pachset contain all kernel side changes. Kajol Jain (5): powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run powerpc/hv-24x7: Add rtas call in hv-24x7 driver t

[PATCH v3] powerpc/kernel/sysfs: Add new config option PMU_SYSFS to enable PMU SPRs sysfs file creation

2020-01-06 Thread Kajol Jain
pilation testing for different architecture include: x86, mips, mips64, alpha, arm. Patch is also compile tested for pmac32_defconfig. Signed-off-by: Kajol Jain --- arch/powerpc/kernel/sysfs.c| 22 +- arch/powerpc/platforms/Kconfig.cputype | 6 ++ 2 files changed,

[PATCH v4] powerpc/kernel/sysfs: Add new config option PMU_SYSFS to enable PMU SPRs sysfs file creation

2020-01-08 Thread Kajol Jain
pilation testing for different architecture include: x86, mips, mips64, alpha, arm. Patch is also compile tested for pmac32_defconfig. Signed-off-by: Kajol Jain --- arch/powerpc/kernel/sysfs.c| 22 +- arch/powerpc/platforms/Kconfig.cputype | 6 ++ 2 files changed,

[RFC 0/6] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-01-17 Thread Kajol Jain
acter in the metric expression to proper value and hv_24x7 json metric file for different Socket/chip resources. Kajol Jain (6): powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor details powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

[RFC 1/6] powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor details

2020-01-17 Thread Kajol Jain
socket. Rtas_call with token "PROCESSOR_MODULE_INFO" is used to get these values. Patch also make these parameters default to 1. Signed-off-by: Kajol Jain --- arch/powerpc/perf/hv-24x7.c | 68 arch/powerpc/platforms/pseries/pseries.h | 3 ++ 2 fil

[RFC 2/6] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

2020-01-17 Thread Kajol Jain
To expose the system dependent parameter like total number of sockets and numbers of chips per socket, patch adds two sysfs files. "sockets" and "chips" are added to /sys/devices/hv_24x7/interface/ of the "hv_24x7" pmu. Signed-off-by: Kajol Jain --- ar

[RFC 3/6] Documentation/ABI: Add ABI documentation for chips and sockets

2020-01-17 Thread Kajol Jain
Add documentation for the following sysfs files: /sys/devices/hv_24x7/interface/chips, /sys/devices/hv_24x7/interface/sockets Signed-off-by: Kajol Jain --- .../testing/sysfs-bus-event_source-devices-hv_24x7 | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Documentation/ABI

[RFC 6/6] perf/tools/pmu-events/powerpc: Add hv_24x7 socket/chip level metric events

2020-01-17 Thread Kajol Jain
:# ./perf stat --metric-only -M Memory_RD_BW_Chip? -C 0 -I 1000 sleep 1 time MB Memory_RD_BW_Chip_0 MB Memory_RD_BW_Chip_1 MB 1.000192635 0.4 0.0 1.001695883 0.0 0.0 Signed-off-by: Kajol Jain

[RFC 4/6] powerpc/hv-24x7: Handle migration case of lpar for proper system information in sysfs

2020-01-17 Thread Kajol Jain
chips per sockets or number of sockets might change. So, it needs to be re-initialized otherwise, these values corresponds to previous system values. This patch adds a call to 'read_sys_info_pseries()' from 'post-mobility_fixup()' to re-init the physsockets and physchips value

[RFC 5/6] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-01-17 Thread Kajol Jain
Function 'arch_get_runtimeparam' implemented in header.c which extract number of sockets from sysfs file "sockets" under "/sys/devices/hv_24x7/interface/". Signed-off-by: Kajol Jain --- tools/perf/arch/powerpc/util/header.c | 40 + tools/perf/util/expr.h

[PATCH 1/2] powerpc/kernel/sysfs: Refactor current sysfs.c

2020-02-14 Thread Kajol Jain
From: Madhavan Srinivasan An attempt to refactor the current sysfs.c file. To start with a big chuck of macro #defines and dscr functions are moved to start of the file. Secondly, HAS_ #define macros are cleanup based on CONFIG_ options Finally new HAS_ macro added: 1. HAS_PPC_PA6T (for PA6T) to

[PATCH 2/2] powerpc/kernel/sysfs: Add new config option PMU_SYSFS to enable PMU SPRs sysfs file creation

2020-02-14 Thread Kajol Jain
h is also tested for pmac32_defconfig. Signed-off-by: Kajol Jain --- arch/powerpc/kernel/sysfs.c| 6 ++ arch/powerpc/platforms/Kconfig.cputype | 6 ++ 2 files changed, 12 insertions(+) diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 74da5eb..cd807e8 10064

[PATCH 0/8] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-02-14 Thread Kajol Jain
ot; character in the metric expression to proper value and hv_24x7 json metric file for different Socket/chip resources. Patch set also enable Hz/hz prinitg for --metric-only option to print metric data for bus frequency. Kajol Jain (8): powerpc/perf/hv-24x7: Fix inconsistent output values in

[PATCH 1/8] powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run

2020-02-14 Thread Kajol Jain
MCS01_128B_RD_DISP_PORT01,chip=0/ 4.000645920 61 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=1/ 4.284169997 22 hv_24x7/PM_MCS01_128B_RD_DISP_PORT01,chip=0/ Signed-off-by: Kajol Jain --- arch/powerpc/perf/hv-24x7.c | 2 +- 1 file changed, 1 insertion(+), 1 d

[PATCH 3/8] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details

2020-02-14 Thread Kajol Jain
To expose the system dependent parameter like total number of sockets and numbers of chips per socket, patch adds two sysfs files. "sockets" and "chips" are added to /sys/devices/hv_24x7/interface/ of the "hv_24x7" pmu. Signed-off-by: Kajol Jain --- ar

[PATCH 2/8] powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor details

2020-02-14 Thread Kajol Jain
socket. Rtas_call with token "PROCESSOR_MODULE_INFO" is used to get these values. Sub-sequent patch exports these values via sysfs. Patch also make these parameters default to 1. Signed-off-by: Kajol Jain --- arch/powerpc/perf/hv-24x7.c | 72 ar

[PATCH 4/8] Documentation/ABI: Add ABI documentation for chips and sockets

2020-02-14 Thread Kajol Jain
Add documentation for the following sysfs files: /sys/devices/hv_24x7/interface/chips, /sys/devices/hv_24x7/interface/sockets Signed-off-by: Kajol Jain --- .../testing/sysfs-bus-event_source-devices-hv_24x7 | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Documentation/ABI

[PATCH 5/8] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration

2020-02-14 Thread Kajol Jain
chips per sockets or number of sockets might change. So, it needs to be re-initialized otherwise, these values corresponds to previous system values. This patch adds a call to 'read_sys_info_pseries()' from 'post-mobility_fixup()' to re-init the physsockets and physchips value

[PATCH 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-02-14 Thread Kajol Jain
Function 'arch_get_runtimeparam' implemented in header.c which extract number of sockets from sysfs file "sockets" under "/sys/devices/hv_24x7/interface/". Signed-off-by: Kajol Jain --- tools/perf/arch/powerpc/util/header.c | 40 + tools/perf/util/expr.h

[PATCH 7/8] tools/perf: Enable Hz/hz prinitg for --metric-only option

2020-02-14 Thread Kajol Jain
Commit 54b5091606c18 ("perf stat: Implement --metric-only mode") added function 'valid_only_metric()' which drops "Hz" or "hz", if it is part of "ScaleUnit". This patch enable it since hv_24x7 supports couple of frequency events. Signed-off-by: K

[PATCH 8/8] perf/tools/pmu-events/powerpc: Add hv_24x7 socket/chip level metric events

2020-02-14 Thread Kajol Jain
:# ./perf stat --metric-only -M Memory_RD_BW_Chip -C 0 -I 1000 sleep 1 time MB Memory_RD_BW_Chip_0 MB Memory_RD_BW_Chip_1 MB 1.000192635 0.4 0.0 1.001695883 0.0 0.0 Signed-off-by: Kajol Jain

  1   2   3   4   5   >