File: //lib/python3.9/site-packages/bcc/__pycache__/__init__.cpython-39.pyc
a
u*�h� � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl
Z
d dlZddlm
Z
mZmZmZmZ ddlmZmZmZmZmZ ddlmZ ddlmZmZmZmZmZ ddl m!Z! dd l"m#Z#m$Z$ dd
l%m&Z&m'Z' ze( W n e)y� e*Z(Y n0 dZ+d a,dd
� Z-dZ.ej/�0e.d�Z1ej/�2e1��s4dZ1dZ3dZ4dZ5dZ6dZ7dZ8G dd� de9�Z:G dd� d�Z;G dd� d�Z<G dd� d�Z=G dd� d�Z>G d d!� d!�Z?G d"d#� d#�Z@G d$d%� d%�ZAG d&d'� d'�ZBG d(d)� d)e9�ZCdS )*� )�print_functionN� )�lib�
bcc_symbol�bcc_symbol_option�bcc_stacktrace_build_id�_SYM_CB_TYPE)�Table�PerfEventArray�RingBuf�BPF_MAP_TYPE_QUEUE�BPF_MAP_TYPE_STACK)�Perf)�get_online_cpus�printb�_assert_is_bytes� ArgString�
StrcmpRewrite)�__version__)�disassemble_prog�
decode_map)�USDT�
USDTExceptioni� c C s t S �N)�_num_open_probes� r r �0/usr/lib/python3.9/site-packages/bcc/__init__.py�_get_num_open_probes+ s r z/sys/kernel/debug�tracingz/sys/kernel/tracing� � � � � c @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�SymbolCachec C s t �|t�d t�t���| _d S r )r Zbcc_symcache_new�ct�cast�POINTERr �cache)�self�pidr r r �__init__D s �zSymbolCache.__init__c C s� t � }|r"t�| j|t�|��}nt�| j|t�|��}|dk rp|jrf|jrfd|jt� |jtj
�jfS d|dfS |r�|j}t�
t�|�� n|j}||jt� |jtj
�jfS )a�
Return a tuple of the symbol (function), its offset from the beginning
of the function, and the module in which it lies. For example:
("start_thread", 0x202, "/usr/lib/.../libpthread-2.24.so")
If the symbol cannot be found but we know which module it is in,
return the module name and the offset from the beginning of the
module. If we don't even know the module, return the absolute
address as the offset.
r N)r r Zbcc_symcache_resolver( r% �byrefZ bcc_symcache_resolve_no_demangle�module�offsetr&