Linux Kernel
3.7.1
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <ctype.h>
#include <errno.h>
#include <stdint.h>
#include <limits.h>
#include "event-parse.h"
#include "event-utils.h"
Go to the source code of this file.
Data Structures | |
struct | event_handler |
struct | pevent_func_params |
struct | pevent_function_handler |
struct | cmdline |
struct | cmdline_list |
struct | func_map |
struct | func_list |
struct | printk_map |
struct | printk_list |
struct | flag |
Macros | |
#define | do_warning(fmt,...) |
#define | PRINT_ARGS 0 |
Definition at line 5067 of file event-parse.c.
#define do_warning | ( | fmt, | |
... | |||
) |
Definition at line 48 of file event-parse.c.
#define PRINT_ARGS 0 |
enum pevent_errno __pevent_parse_format | ( | struct event_format ** | eventp, |
struct pevent * | pevent, | ||
const char * | buf, | ||
unsigned long | size, | ||
const char * | sys | ||
) |
__pevent_parse_format - parse the event format : the buffer storing the event format string : the size of : the system the event belongs to
This parses the event format and creates an event structure to quickly parse raw data for a given event.
These files currently come from:
/sys/kernel/debug/tracing/events/.../.../format
Definition at line 4901 of file event-parse.c.
Definition at line 119 of file event-parse.c.
Definition at line 113 of file event-parse.c.
int get_field_val | ( | struct trace_seq * | s, |
struct format_field * | field, | ||
const char * | name, | ||
struct pevent_record * | record, | ||
unsigned long long * | val, | ||
int | err | ||
) |
Definition at line 5114 of file event-parse.c.
pevent_alloc - create a pevent handle
Definition at line 5478 of file event-parse.c.
pevent_buffer_init - init buffer for parsing : buffer to parse : the size of the buffer
For use with pevent_read_token(), this initializes the internal buffer that pevent_read_token() will parse.
Definition at line 108 of file event-parse.c.
|
read |
void pevent_data_lat_fmt | ( | struct pevent * | pevent, |
struct trace_seq * | s, | ||
struct pevent_record * | record | ||
) |
pevent_data_lat_fmt - parse the data for the latency format : a handle to the pevent : the trace_seq to write to : the record to read from
This parses out the Latency format (interrupts disabled, need rescheduling, in hard/soft interrupt, preempt count and lock depth) and places it into the trace_seq.
Definition at line 4254 of file event-parse.c.
int pevent_data_pid | ( | struct pevent * | pevent, |
struct pevent_record * | rec | ||
) |
int pevent_data_type | ( | struct pevent * | pevent, |
struct pevent_record * | rec | ||
) |
|
read |
|
read |
void pevent_event_info | ( | struct trace_seq * | s, |
struct event_format * | event, | ||
struct pevent_record * | record | ||
) |
|
read |
Definition at line 2976 of file event-parse.c.
|
read |
Definition at line 2931 of file event-parse.c.
|
read |
pevent_find_event - find an event by given id : a handle to the pevent : the id of the event
Returns an event that has a given .
Definition at line 3132 of file event-parse.c.
|
read |
Definition at line 3165 of file event-parse.c.
|
read |
Definition at line 2953 of file event-parse.c.
pevent_find_function - find a function by a given address : handle for the pevent : the address to find the function with
Returns a pointer to the function stored that has the given address. Note, the address does not have to be exact, it will select the function that would contain the address.
Definition at line 421 of file event-parse.c.
pevent_find_function_address - find a function address by a given address : handle for the pevent : the address to find the function with
Returns the address the function starts at. This can be used in conjunction with pevent_find_function to print both the function name and the function offset.
Definition at line 442 of file event-parse.c.
pevent_free - free a pevent handle : the pevent handle to free
Definition at line 5529 of file event-parse.c.
void pevent_free_format | ( | struct event_format * | event | ) |
Definition at line 5512 of file event-parse.c.
pevent_free_token - free a token returned by pevent_read_token : the token to free
Definition at line 1062 of file event-parse.c.
int pevent_get_any_field_val | ( | struct trace_seq * | s, |
struct event_format * | event, | ||
const char * | name, | ||
struct pevent_record * | record, | ||
unsigned long long * | val, | ||
int | err | ||
) |
Definition at line 5244 of file event-parse.c.
int pevent_get_common_field_val | ( | struct trace_seq * | s, |
struct event_format * | event, | ||
const char * | name, | ||
struct pevent_record * | record, | ||
unsigned long long * | val, | ||
int | err | ||
) |
Definition at line 5219 of file event-parse.c.
void* pevent_get_field_raw | ( | struct trace_seq * | s, |
struct event_format * | event, | ||
const char * | name, | ||
struct pevent_record * | record, | ||
int * | len, | ||
int | err | ||
) |
Definition at line 5147 of file event-parse.c.
int pevent_get_field_val | ( | struct trace_seq * | s, |
struct event_format * | event, | ||
const char * | name, | ||
struct pevent_record * | record, | ||
unsigned long long * | val, | ||
int | err | ||
) |
Definition at line 5194 of file event-parse.c.
Definition at line 61 of file event-parse.c.
Definition at line 66 of file event-parse.c.
|
read |
Definition at line 4515 of file event-parse.c.
enum pevent_errno pevent_parse_event | ( | struct pevent * | pevent, |
const char * | buf, | ||
unsigned long | size, | ||
const char * | sys | ||
) |
pevent_parse_event - parse the event format : the handle to the pevent : the buffer storing the event format string : the size of : the system the event belongs to
This parses the event format and creates an event structure to quickly parse raw data for a given event.
These files currently come from:
/sys/kernel/debug/tracing/events/.../.../format
Definition at line 5041 of file event-parse.c.
enum pevent_errno pevent_parse_format | ( | struct event_format ** | eventp, |
const char * | buf, | ||
unsigned long | size, | ||
const char * | sys | ||
) |
pevent_parse_format - parse the event format : the buffer storing the event format string : the size of : the system the event belongs to
This parses the event format and creates an event structure to quickly parse raw data for a given event.
These files currently come from:
/sys/kernel/debug/tracing/events/.../.../format
Definition at line 5021 of file event-parse.c.
int pevent_parse_header_page | ( | struct pevent * | pevent, |
char * | buf, | ||
unsigned long | size, | ||
int | long_size | ||
) |
pevent_parse_header_page - parse the data stored in the header page : the handle to the pevent : the buffer storing the header page format string : the size of : the long size to use if there is no header
This parses the header page format for information on the ring buffer used. The should be copied from
/sys/kernel/debug/tracing/events/header_page
Definition at line 4807 of file event-parse.c.
pevent_peek_char - peek at the next character that will be read
Returns the next character read, or -1 if end of buffer.
Definition at line 805 of file event-parse.c.
pevent_pid_is_registered - return if a pid has a cmdline registered : handle for the pevent : The pid to check if it has a cmdline registered with.
Returns 1 if the pid has a cmdline mapped to it 0 otherwise.
Definition at line 206 of file event-parse.c.
void pevent_print_event | ( | struct pevent * | pevent, |
struct trace_seq * | s, | ||
struct pevent_record * | record | ||
) |
Definition at line 4408 of file event-parse.c.
pevent_print_funcs - print out the stored functions : handle for the pevent
This prints out the stored functions.
Definition at line 504 of file event-parse.c.
int pevent_print_num_field | ( | struct trace_seq * | s, |
const char * | fmt, | ||
struct event_format * | event, | ||
const char * | name, | ||
struct pevent_record * | record, | ||
int | err | ||
) |
Definition at line 5269 of file event-parse.c.
pevent_print_printk - print out the stored strings : handle for the pevent
This prints the string formats that were stored.
Definition at line 635 of file event-parse.c.
enum event_type pevent_read_token | ( | char ** | tok | ) |
Definition at line 5488 of file event-parse.c.
int pevent_register_event_handler | ( | struct pevent * | pevent, |
int | id, | ||
char * | sys_name, | ||
char * | event_name, | ||
pevent_event_handler_func | func, | ||
void * | context | ||
) |
pevent_register_event_handler - register a way to parse an event : the handle to the pevent : the id of the event to register : the system name the event belongs to : the name of the event : the function to call to parse the event information : the data to be passed to
This function allows a developer to override the parsing of a given event. If for some reason the default print format is not sufficient, this function will register a function for an event to be used to parse the data instead.
If is >= 0, then it is used to find the event. else and are used.
Definition at line 5414 of file event-parse.c.
int pevent_register_function | ( | struct pevent * | pevent, |
char * | func, | ||
unsigned long long | addr, | ||
char * | mod | ||
) |
pevent_register_function - register a function with a given address : handle for the pevent : the function name to register : the address the function starts at : the kernel module the function may be in (NULL for none)
This registers a function name with an address and module. The passed in is duplicated.
Definition at line 463 of file event-parse.c.
int pevent_register_print_function | ( | struct pevent * | pevent, |
pevent_func_handler | func, | ||
enum pevent_func_arg_type | ret_type, | ||
char * | name, | ||
... | |||
) |
Definition at line 5320 of file event-parse.c.
pevent_register_print_string - register a string by its address : handle for the pevent : the string format to register : the address the string was located at
This registers a string by the address it was stored in the kernel. The passed in is duplicated.
Definition at line 603 of file event-parse.c.
Definition at line 5073 of file event-parse.c.
Definition at line 5612 of file event-parse.c.