From: Tejas Manhas <tejas05@linux.ibm.com>
To: Gautam Menghani <Gautam.Menghani@ibm.com>,
peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
namhyung@kernel.org, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@kernel.org,
irogers@google.com, adrian.hunter@intel.com,
james.clark@linaro.org, atrajeev@linux.ibm.com
Cc: Gautam Menghani <gautam@linux.ibm.com>,
linux-perf-users@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf script powerpc: Update the hcall list with new hcalls
Date: Wed, 20 May 2026 09:25:08 +0530 [thread overview]
Message-ID: <61c8d600-72b4-4320-a1ff-18e061569f24@linux.ibm.com> (raw)
In-Reply-To: <20260512084654.57729-1-Gautam.Menghani@ibm.com>
[-- Attachment #1: Type: text/plain, Size: 7636 bytes --]
> From: Gautam Menghani<gautam@linux.ibm.com>
>
> Update the hcall list with the hcalls in bcc's ppchcalls script [1].
>
> [1] :https://github.com/iovisor/bcc/blob/master/tools/ppchcalls.py
>
> Signed-off-by: Gautam Menghani<gautam@linux.ibm.com>
> ---
> tools/perf/scripts/python/powerpc-hcalls.py | 86 ++++++++++++++++++++-
> 1 file changed, 85 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/scripts/python/powerpc-hcalls.py b/tools/perf/scripts/python/powerpc-hcalls.py
> index 8b78dc790adb..f69a1d229526 100644
> --- a/tools/perf/scripts/python/powerpc-hcalls.py
> +++ b/tools/perf/scripts/python/powerpc-hcalls.py
> @@ -112,11 +112,12 @@ hcall_table = {
> 420: 'H_CREATE_RPT',
> 424: 'H_REMOVE_RPT',
> 428: 'H_REGISTER_RPAGES',
> - 432: 'H_DISABLE_AND_GETC',
> + 432: 'H_DISABLE_AND_GET',
> 436: 'H_ERROR_DATA',
> 440: 'H_GET_HCA_INFO',
> 444: 'H_GET_PERF_COUNT',
> 448: 'H_MANAGE_TRACE',
> + 456: 'H_GET_CPU_CHARACTERISTICS',
> 468: 'H_FREE_LOGICAL_LAN_BUFFER',
> 472: 'H_POLL_PENDING',
> 484: 'H_QUERY_INT_STATE',
> @@ -135,11 +136,17 @@ hcall_table = {
> 644: 'H_ADD_CONN',
> 648: 'H_DEL_CONN',
> 664: 'H_JOIN',
> + 672: 'H_VASI_SIGNAL',
> 676: 'H_VASI_STATE',
> + 680: 'H_VIOCTL',
> 688: 'H_ENABLE_CRQ',
> 696: 'H_GET_EM_PARMS',
> 720: 'H_SET_MPP',
> 724: 'H_GET_MPP',
> + 732: 'H_REG_SUB_CRQ',
> + 736: 'H_FREE_SUB_CRQ',
> + 740: 'H_SEND_SUB_CRQ',
> + 744: 'H_SEND_SUB_CRQ_INDIRECT',
> 748: 'H_HOME_NODE_ASSOCIATIVITY',
> 756: 'H_BEST_ENERGY',
> 764: 'H_XIRR_X',
> @@ -147,7 +154,84 @@ hcall_table = {
> 772: 'H_COP',
> 788: 'H_GET_MPP_X',
> 796: 'H_SET_MODE',
> + 808: 'H_BLOCK_REMOVE',
> + 856: 'H_CLEAR_HPT',
> + 864: 'H_REQUEST_VMC',
> + 876: 'H_RESIZE_HPT_PREPARE',
> + 880: 'H_RESIZE_HPT_COMMIT',
> + 892: 'H_REGISTER_PROC_TBL',
> + 896: 'H_SIGNAL_SYS_RESET',
> + 904: 'H_ALLOCATE_VAS_WINDOW',
> + 908: 'H_MODIFY_VAS_WINDOW',
> + 912: 'H_DEALLOCATE_VAS_WINDOW',
> + 916: 'H_QUERY_VAS_WINDOW',
> + 920: 'H_QUERY_VAS_CAPABILITIES',
> + 924: 'H_QUERY_NX_CAPABILITIES',
> + 928: 'H_GET_NX_FAULT',
> + 936: 'H_INT_GET_SOURCE_INFO',
> + 940: 'H_INT_SET_SOURCE_CONFIG',
> + 944: 'H_INT_GET_SOURCE_CONFIG',
> + 948: 'H_INT_GET_QUEUE_INFO',
> + 952: 'H_INT_SET_QUEUE_CONFIG',
> + 956: 'H_INT_GET_QUEUE_CONFIG',
> + 960: 'H_INT_SET_OS_REPORTING_LINE',
> + 964: 'H_INT_GET_OS_REPORTING_LINE',
> + 968: 'H_INT_ESB',
> + 972: 'H_INT_SYNC',
> + 976: 'H_INT_RESET',
> + 996: 'H_SCM_READ_METADATA',
> + 1000: 'H_SCM_WRITE_METADATA',
> + 1004: 'H_SCM_BIND_MEM',
> + 1008: 'H_SCM_UNBIND_MEM',
> + 1012: 'H_SCM_QUERY_BLOCK_MEM_BINDING',
> + 1016: 'H_SCM_QUERY_LOGICAL_MEM_BINDING',
> + 1020: 'H_SCM_UNBIND_ALL',
> + 1024: 'H_SCM_HEALTH',
> + 1048: 'H_SCM_PERFORMANCE_STATS',
> + 1052: 'H_PKS_GET_CONFIG',
> + 1056: 'H_PKS_SET_PASSWORD',
> + 1060: 'H_PKS_GEN_PASSWORD',
> + 1068: 'H_PKS_WRITE_OBJECT',
> + 1072: 'H_PKS_GEN_KEY',
> + 1076: 'H_PKS_READ_OBJECT',
> + 1080: 'H_PKS_REMOVE_OBJECT',
> + 1084: 'H_PKS_CONFIRM_OBJECT_FLUSHED',
> + 1096: 'H_RPT_INVALIDATE',
> + 1100: 'H_SCM_FLUSH',
> + 1104: 'H_GET_ENERGY_SCALE_INFO',
> + 1108: 'H_PKS_SIGNED_UPDATE',
> + 1116: 'H_WATCHDOG',
> + # Platform specific hcalls used by KVM on PowerVM
> + 1120: 'H_GUEST_GET_CAPABILITIES',
> + 1124: 'H_GUEST_SET_CAPABILITIES',
> + 1136: 'H_GUEST_CREATE',
> + 1140: 'H_GUEST_CREATE_VCPU',
> + 1144: 'H_GUEST_GET_STATE',
> + 1148: 'H_GUEST_SET_STATE',
> + 1152: 'H_GUEST_RUN_VCPU',
> + 1156: 'H_GUEST_COPY_MEMORY',
> + 1160: 'H_GUEST_DELETE',
> + # Platform-specific hcalls used by the Ultravisor
> + 61184: 'H_SVM_PAGE_IN',
> + 61188: 'H_SVM_PAGE_OUT',
> + 61192: 'H_SVM_INIT_START',
> + 61196: 'H_SVM_INIT_DONE',
> + 61204: 'H_SVM_INIT_ABORT',
> + # Platform specific hcalls used by KVM
> 61440: 'H_RTAS',
> + # Platform specific hcalls used by QEMU/SLOF
> + 61441: 'H_LOGICAL_MEMOP',
> + 61442: 'H_CAS',
> + 61443: 'H_UPDATE_DT',
> + # Platform specific hcalls provided by PHYP
> + 61560: 'H_GET_24X7_CATALOG_PAGE',
> + 61564: 'H_GET_24X7_DATA',
> + 61568: 'H_GET_PERF_COUNTER_INFO',
> + # Platform-specific hcalls used for nested HV KVM
> + 63488: 'H_SET_PARTITION_TABLE',
> + 63492: 'H_ENTER_NESTED',
> + 63496: 'H_TLB_INVALIDATE',
> + 63500: 'H_COPY_TOFROM_GUEST',
> }
>
> def hcall_table_lookup(opcode):
Hi Gautam,
This patch doesn't seem to resolve the issue where numbers are seen instead of hcalls.
I have applied to the latest upstream but the numbers are still visible in perf script.
Also the command doesn't recognise python-audit already present in the system.
Please find logs below for better understanding.
before patch
# perf record -a -e powerpc:hcall* sleep 10
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.343 MB perf.data (2388 samples) ]
[root@ltcden14-lp10 perf]# perf script -s ./powerpc-hcalls.py -i ./perf.data
Install the python-audit package to get syscall names.
For example:
# apt-get install python3-audit (Ubuntu)
# yum install python3-audit (Fedora)
etc.
hcall count min(ns) max(ns) avg(ns)
--------------------------------------------------------------------
H_VIO_SIGNAL 614 376 14068 1644
584 36 1094 16120 2839
H_ADD_LOGICAL_LAN_BUFFER 9 660 3572 1320
H_STUFF_TCE 132 632 12530 1310
H_PUT_TCE 236 466 5500 865
H_RANDOM 4 446 3300 1168
H_PUT_TCE_INDIRECT 53 648 14318 2066
H_SEND_CRQ 108 848 7754 1983
after patch
# yum install python3-audit
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
rhe12_debug1 8.4 kB/s | 1.5 kB 00:00
rh102_base_upd 41 kB/s | 2.7 kB 00:00
rh102_app_upd 14 kB/s | 2.8 kB 00:00
rh102_crb 14 kB/s | 2.7 kB 00:00
rh102_srcbase 7.6 kB/s | 1.5 kB 00:00
rh102_srcas 6.9 kB/s | 1.5 kB 00:00
rh102_debug 7.1 kB/s | 1.5 kB 00:00
rhe102_debug1 7.1 kB/s | 1.5 kB 00:00
Package python3-audit-4.0.3-5.el10.ppc64le is already installed.
Dependencies resolved.
Nothing to do.
Complete!
# ./perf script -s scripts/python/powerpc-hcalls.py -i ./perf.data
Install the python-audit package to get syscall names.
For example:
# apt-get install python3-audit (Ubuntu)
# yum install python3-audit (Fedora)
etc.
hcall count min(ns) max(ns) avg(ns)
--------------------------------------------------------------------
H_VIO_SIGNAL 533 404 13154 1638
584 37 1034 14722 3178
H_ADD_LOGICAL_LAN_BUFFER 8 802 2602 1217
H_SEND_CRQ 11 926 17536 4105
H_STUFF_TCE 13 658 5306 1974
H_PUT_TCE 18 476 5034 1476
H_PUT_TCE_INDIRECT 5 1698 8934 4370
[root@ltcden14-lp10 perf]#
Please add the tag below.
Reported-by: Tejas Manhas<tejas05@linux.ibm.com>
Thanks & Regards,
Tejas
[-- Attachment #2: Type: text/html, Size: 8026 bytes --]
next prev parent reply other threads:[~2026-05-20 4:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 8:46 [PATCH] perf script powerpc: Update the hcall list with new hcalls Gautam Menghani
2026-05-20 3:55 ` Tejas Manhas [this message]
2026-05-30 0:01 ` Arnaldo Carvalho de Melo
2026-06-02 12:06 ` Gautam Menghani
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=61c8d600-72b4-4320-a1ff-18e061569f24@linux.ibm.com \
--to=tejas05@linux.ibm.com \
--cc=Gautam.Menghani@ibm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=atrajeev@linux.ibm.com \
--cc=gautam@linux.ibm.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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