tools/perf/scripts/python/powerpc-hcalls.py
Source file repositories/reference/linux-study-clean/tools/perf/scripts/python/powerpc-hcalls.py
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/scripts/python/powerpc-hcalls.py- Extension
.py- Size
- 4509 bytes
- Lines
- 203
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: tools
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
# SPDX-License-Identifier: GPL-2.0+
#
# Copyright (C) 2018 Ravi Bangoria, IBM Corporation
#
# Hypervisor call statisics
from __future__ import print_function
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
# output: {
# opcode: {
# 'min': minimum time nsec
# 'max': maximum time nsec
# 'time': average time nsec
# 'cnt': counter
# } ...
# }
output = {}
# d_enter: {
# cpu: {
# opcode: nsec
# } ...
# }
d_enter = {}
hcall_table = {
4: 'H_REMOVE',
8: 'H_ENTER',
12: 'H_READ',
16: 'H_CLEAR_MOD',
20: 'H_CLEAR_REF',
24: 'H_PROTECT',
28: 'H_GET_TCE',
32: 'H_PUT_TCE',
36: 'H_SET_SPRG0',
40: 'H_SET_DABR',
44: 'H_PAGE_INIT',
48: 'H_SET_ASR',
52: 'H_ASR_ON',
56: 'H_ASR_OFF',
60: 'H_LOGICAL_CI_LOAD',
64: 'H_LOGICAL_CI_STORE',
68: 'H_LOGICAL_CACHE_LOAD',
72: 'H_LOGICAL_CACHE_STORE',
76: 'H_LOGICAL_ICBI',
80: 'H_LOGICAL_DCBF',
84: 'H_GET_TERM_CHAR',
88: 'H_PUT_TERM_CHAR',
92: 'H_REAL_TO_LOGICAL',
96: 'H_HYPERVISOR_DATA',
100: 'H_EOI',
104: 'H_CPPR',
108: 'H_IPI',
112: 'H_IPOLL',
116: 'H_XIRR',
120: 'H_MIGRATE_DMA',
124: 'H_PERFMON',
220: 'H_REGISTER_VPA',
224: 'H_CEDE',
228: 'H_CONFER',
Annotation
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.