|
Linux Perf
|
#include <Python.h>#include <inttypes.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <stdbool.h>#include <errno.h>#include <linux/bitmap.h>#include <linux/compiler.h>#include <linux/time64.h>#include "../../perf.h"#include "../debug.h"#include "../callchain.h"#include "../evsel.h"#include "../util.h"#include "../event.h"#include "../thread.h"#include "../comm.h"#include "../machine.h"#include "../db-export.h"#include "../thread-stack.h"#include "../trace-event.h"#include "../call-path.h"#include "thread_map.h"#include "cpumap.h"#include "print_binary.h"#include "stat.h"#include "mem-events.h"
Go to the source code of this file.
Classes | |
| struct | tables |
Macros | |
| #define | _PyUnicode_FromString(arg) PyString_FromString(arg) |
| #define | _PyUnicode_FromStringAndSize(arg1, arg2) PyString_FromStringAndSize((arg1), (arg2)) |
| #define | _PyBytes_FromStringAndSize(arg1, arg2) PyString_FromStringAndSize((arg1), (arg2)) |
| #define | _PyLong_FromLong(arg) PyInt_FromLong(arg) |
| #define | _PyLong_AsLong(arg) PyInt_AsLong(arg) |
| #define | _PyCapsule_New(arg1, arg2, arg3) PyCObject_FromVoidPtr((arg1), (arg2)) |
| #define | TRACE_EVENT_TYPE_MAX ((1 << (sizeof(unsigned short) * 8)) - 1) |
| #define | MAX_FIELDS 64 |
| #define | N_COMMON_FIELDS 7 |
| #define | SET_TABLE_HANDLER_(name, handler_name, table_name) |
| #define | SET_TABLE_HANDLER(name) SET_TABLE_HANDLER_(name, name ## _handler, name ## _table) |
Functions | |
| PyMODINIT_FUNC | initperf_trace_context (void) |
| static | DECLARE_BITMAP (events_defined, TRACE_EVENT_TYPE_MAX) |
| static void | handler_call_die (const char *handler_name) __noreturn |
| static void | pydict_set_item_string_decref (PyObject *dict, const char *key, PyObject *val) |
| static PyObject * | get_handler (const char *handler_name) |
| static int | get_argument_count (PyObject *handler) |
| static void | call_object (PyObject *handler, PyObject *args, const char *die_msg) |
| static void | try_call_object (const char *handler_name, PyObject *args) |
| static void | define_value (enum print_arg_type field_type, const char *ev_name, const char *field_name, const char *field_value, const char *field_str) |
| static void | define_values (enum print_arg_type field_type, struct print_flag_sym *field, const char *ev_name, const char *field_name) |
| static void | define_field (enum print_arg_type field_type, const char *ev_name, const char *field_name, const char *delim) |
| static void | define_event_symbols (struct event_format *event, const char *ev_name, struct print_arg *args) |
| static PyObject * | get_field_numeric_entry (struct event_format *event, struct format_field *field, void *data) |
| static const char * | get_dsoname (struct map *map) |
| static PyObject * | python_process_callchain (struct perf_sample *sample, struct perf_evsel *evsel, struct addr_location *al) |
| static PyObject * | python_process_brstack (struct perf_sample *sample, struct thread *thread) |
| static unsigned long | get_offset (struct symbol *sym, struct addr_location *al) |
| static int | get_symoff (struct symbol *sym, struct addr_location *al, bool print_off, char *bf, int size) |
| static int | get_br_mspred (struct branch_flags *flags, char *bf, int size) |
| static PyObject * | python_process_brstacksym (struct perf_sample *sample, struct thread *thread) |
| static PyObject * | get_sample_value_as_tuple (struct sample_read_value *value) |
| static void | set_sample_read_in_dict (PyObject *dict_sample, struct perf_sample *sample, struct perf_evsel *evsel) |
| static void | set_sample_datasrc_in_dict (PyObject *dict, struct perf_sample *sample) |
| static int | regs_map (struct regs_dump *regs, uint64_t mask, char *bf, int size) |
| static void | set_regs_in_dict (PyObject *dict, struct perf_sample *sample, struct perf_evsel *evsel) |
| static PyObject * | get_perf_sample_dict (struct perf_sample *sample, struct perf_evsel *evsel, struct addr_location *al, PyObject *callchain) |
| static void | python_process_tracepoint (struct perf_sample *sample, struct perf_evsel *evsel, struct addr_location *al) |
| static PyObject * | tuple_new (unsigned int sz) |
| static int | tuple_set_u64 (PyObject *t, unsigned int pos, u64 val) |
| static int | tuple_set_s32 (PyObject *t, unsigned int pos, s32 val) |
| static int | tuple_set_string (PyObject *t, unsigned int pos, const char *s) |
| static int | python_export_evsel (struct db_export *dbe, struct perf_evsel *evsel) |
| static int | python_export_machine (struct db_export *dbe, struct machine *machine) |
| static int | python_export_thread (struct db_export *dbe, struct thread *thread, u64 main_thread_db_id, struct machine *machine) |
| static int | python_export_comm (struct db_export *dbe, struct comm *comm) |
| static int | python_export_comm_thread (struct db_export *dbe, u64 db_id, struct comm *comm, struct thread *thread) |
| static int | python_export_dso (struct db_export *dbe, struct dso *dso, struct machine *machine) |
| static int | python_export_symbol (struct db_export *dbe, struct symbol *sym, struct dso *dso) |
| static int | python_export_branch_type (struct db_export *dbe, u32 branch_type, const char *name) |
| static int | python_export_sample (struct db_export *dbe, struct export_sample *es) |
| static int | python_export_call_path (struct db_export *dbe, struct call_path *cp) |
| static int | python_export_call_return (struct db_export *dbe, struct call_return *cr) |
| static int | python_process_call_return (struct call_return *cr, void *data) |
| static void | python_process_general_event (struct perf_sample *sample, struct perf_evsel *evsel, struct addr_location *al) |
| static void | python_process_event (union perf_event *event, struct perf_sample *sample, struct perf_evsel *evsel, struct addr_location *al) |
| static void | get_handler_name (char *str, size_t size, struct perf_evsel *evsel) |
| static void | process_stat (struct perf_evsel *counter, int cpu, int thread, u64 tstamp, struct perf_counts_values *count) |
| static void | python_process_stat (struct perf_stat_config *config, struct perf_evsel *counter, u64 tstamp) |
| static void | python_process_stat_interval (u64 tstamp) |
| static int | run_start_sub (void) |
| static void | set_table_handlers (struct tables *tables) |
| static void | _free_command_line (const char **command_line, int num) |
| static int | python_start_script (const char *script, int argc, const char **argv) |
| static int | python_flush_script (void) |
| static int | python_stop_script (void) |
| static int | python_generate_script (struct pevent *pevent, const char *outfile) |
Variables | |
| struct scripting_context * | scripting_context |
| static char * | cur_field_name |
| static int | zero_flag_atom |
| static PyObject * | main_module |
| static PyObject * | main_dict |
| static struct tables | tables_global |
| struct scripting_ops | python_scripting_ops |
| #define _PyBytes_FromStringAndSize | ( | arg1, | |
| arg2 | |||
| ) | PyString_FromStringAndSize((arg1), (arg2)) |
Definition at line 58 of file trace-event-python.c.
| #define _PyCapsule_New | ( | arg1, | |
| arg2, | |||
| arg3 | |||
| ) | PyCObject_FromVoidPtr((arg1), (arg2)) |
Definition at line 64 of file trace-event-python.c.
| #define _PyLong_AsLong | ( | arg | ) | PyInt_AsLong(arg) |
Definition at line 62 of file trace-event-python.c.
| #define _PyLong_FromLong | ( | arg | ) | PyInt_FromLong(arg) |
Definition at line 60 of file trace-event-python.c.
| #define _PyUnicode_FromString | ( | arg | ) | PyString_FromString(arg) |
Definition at line 54 of file trace-event-python.c.
| #define _PyUnicode_FromStringAndSize | ( | arg1, | |
| arg2 | |||
| ) | PyString_FromStringAndSize((arg1), (arg2)) |
Definition at line 56 of file trace-event-python.c.
| #define MAX_FIELDS 64 |
Definition at line 90 of file trace-event-python.c.
| #define N_COMMON_FIELDS 7 |
Definition at line 91 of file trace-event-python.c.
| #define SET_TABLE_HANDLER | ( | name | ) | SET_TABLE_HANDLER_(name, name ## _handler, name ## _table) |
Definition at line 1388 of file trace-event-python.c.
| #define SET_TABLE_HANDLER_ | ( | name, | |
| handler_name, | |||
| table_name | |||
| ) |
Definition at line 1382 of file trace-event-python.c.
| #define TRACE_EVENT_TYPE_MAX ((1 << (sizeof(unsigned short) * 8)) - 1) |
Definition at line 85 of file trace-event-python.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 149 of file trace-event-python.c.
|
static |
Definition at line 545 of file trace-event-python.c.
|
static |
Definition at line 376 of file trace-event-python.c.
|
static |
|
static |
Definition at line 139 of file trace-event-python.c.
|
static |
|
static |
Definition at line 517 of file trace-event-python.c.
|
static |
|
static |
Definition at line 619 of file trace-event-python.c.
|
static |
|
static |
Definition at line 119 of file trace-event-python.c.
|
static |
|
static |
Definition at line 133 of file trace-event-python.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 922 of file trace-event-python.c.
|
static |
Definition at line 942 of file trace-event-python.c.
|
static |
Definition at line 947 of file trace-event-python.c.
|
static |
Definition at line 932 of file trace-event-python.c.
|
static |
Definition at line 95 of file trace-event-python.c.
|
static |
Definition at line 98 of file trace-event-python.c.
|
static |
Definition at line 98 of file trace-event-python.c.
| struct scripting_ops python_scripting_ops |
Definition at line 1776 of file trace-event-python.c.
| struct scripting_context* scripting_context |
Definition at line 32 of file trace-event-scripting.c.
|
static |
Definition at line 116 of file trace-event-python.c.
|
static |
Definition at line 96 of file trace-event-python.c.