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.

Dependency Surface

Detected Declarations

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

Implementation Notes