File: //usr/lib/python3.6/site-packages/bcc/__pycache__/__init__.cpython-36.pyc
3
:�)gh � @ 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' ye( W n e)k
�r e*Z(Y nX dZ+d a,dd
� Z-dZ.dZ/dZ0dZ1dZ2dZ3dZ4G dd� de5�Z6G dd� d�Z7G dd� d�Z8G dd� d�Z9G dd� d�Z:G dd� d�Z;G d d!� d!�Z<G d"d#� d#�Z=G d$d%� d%�Z>G d&d'� d'e5�Z?dS )(� )�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 �/usr/lib/python3.6/__init__.py�_get_num_open_probes+ s r z/sys/kernel/debug/tracing� � � � � c @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�SymbolCachec C s t j|tjd tjt���| _d S )N)r Zbcc_symcache_new�ct�cast�POINTERr �cache)�self�pidr r r �__init__A s zSymbolCache.__init__c C s� t � }|r"tj| j|tj|��}ntj| j|tj|��}|dk rp|jrf|jrfd|jtj |jtj
�jfS d|dfS |r�|j}tj
tj|�� n|j}||jtj |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&