summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2018-08-18 13:11:51 +0200
committerIngo Molnar <mingo@kernel.org>2018-08-18 13:11:51 +0200
commit5804b11034a21e4287daaf017c5ad60ad7af8d67 (patch)
tree79dd4998b58e3124bc2e5749914e4046afe5d0fd /tools
parent13e091b6dd0e78a518a7d8756607d3acb8215768 (diff)
parent6855dc41b24619c3d1de3dbd27dd0546b0e45272 (diff)
Merge tag 'perf-core-for-mingo-4.19-20180815' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: kernel: - kallsyms, x86: Export addresses of PTI entry trampolines (Alexander Shishkin) - kallsyms: Simplify update_iter_mod() (Adrian Hunter) - x86: Add entry trampolines to kcore (Adrian Hunter) Hardware tracing: - Fix auxtrace queue resize (Adrian Hunter) Arch specific: - Fix uninitialized ARM SPE record error variable (Kim Phillips) - Fix trace event post-processing in powerpc (Sandipan Das) Build: - Fix check-headers.sh AND list path of execution (Alexander Kapshuk) - Remove -mcet and -fcf-protection when building the python binding with older clang versions (Arnaldo Carvalho de Melo) - Make check-headers.sh check based on kernel dir (Jiri Olsa) - Move syscall_64.tbl check into check-headers.sh (Jiri Olsa) Infrastructure: - Check for null when copying nsinfo. (Benno Evers) Libraries: - Rename libtraceevent prefixes, prep work for making it a shared library generaly available (Tzvetomir Stoyanov (VMware)) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/lockdep/Makefile4
-rw-r--r--tools/lib/traceevent/Makefile4
-rw-r--r--tools/lib/traceevent/event-parse.c696
-rw-r--r--tools/lib/traceevent/event-parse.h458
-rw-r--r--tools/lib/traceevent/event-plugin.c70
-rw-r--r--tools/lib/traceevent/parse-filter.c288
-rw-r--r--tools/lib/traceevent/plugin_cfg80211.c20
-rw-r--r--tools/lib/traceevent/plugin_function.c34
-rw-r--r--tools/lib/traceevent/plugin_hrtimer.c56
-rw-r--r--tools/lib/traceevent/plugin_jbd2.c36
-rw-r--r--tools/lib/traceevent/plugin_kmem.c66
-rw-r--r--tools/lib/traceevent/plugin_kvm.c154
-rw-r--r--tools/lib/traceevent/plugin_mac80211.c28
-rw-r--r--tools/lib/traceevent/plugin_sched_switch.c60
-rw-r--r--tools/lib/traceevent/plugin_scsi.c24
-rw-r--r--tools/lib/traceevent/plugin_xen.c20
-rw-r--r--tools/perf/Documentation/perf-annotate.txt9
-rw-r--r--tools/perf/Documentation/perf-report.txt9
-rw-r--r--tools/perf/arch/arm64/util/arm-spe.c1
-rw-r--r--tools/perf/arch/powerpc/util/sym-handling.c4
-rw-r--r--tools/perf/arch/s390/util/auxtrace.c1
-rw-r--r--tools/perf/arch/x86/Makefile3
-rw-r--r--tools/perf/builtin-annotate.c4
-rw-r--r--tools/perf/builtin-kmem.c6
-rw-r--r--tools/perf/builtin-report.c9
-rw-r--r--tools/perf/builtin-script.c6
-rw-r--r--tools/perf/builtin-trace.c191
-rwxr-xr-xtools/perf/check-headers.sh17
-rw-r--r--tools/perf/examples/bpf/augmented_syscalls.c55
-rw-r--r--tools/perf/examples/bpf/hello.c9
-rw-r--r--tools/perf/examples/bpf/sys_enter_openat.c33
-rw-r--r--tools/perf/include/bpf/bpf.h20
-rw-r--r--tools/perf/include/bpf/stdio.h19
-rw-r--r--tools/perf/pmu-events/arch/arm64/ampere/emag/core-imp-def.json32
-rw-r--r--tools/perf/pmu-events/arch/arm64/mapfile.csv1
-rw-r--r--tools/perf/tests/bitmap.c2
-rw-r--r--tools/perf/tests/mem2node.c2
-rw-r--r--tools/perf/ui/browsers/annotate.c76
-rw-r--r--tools/perf/util/Build1
-rw-r--r--tools/perf/util/annotate.c301
-rw-r--r--tools/perf/util/annotate.h54
-rw-r--r--tools/perf/util/auxtrace.c6
-rw-r--r--tools/perf/util/auxtrace.h1
-rw-r--r--tools/perf/util/bpf-loader.c48
-rw-r--r--tools/perf/util/bpf-loader.h23
-rw-r--r--tools/perf/util/data-convert-bt.c6
-rw-r--r--tools/perf/util/event.c13
-rw-r--r--tools/perf/util/evsel.c2
-rw-r--r--tools/perf/util/evsel.h7
-rw-r--r--tools/perf/util/header.c9
-rw-r--r--tools/perf/util/machine.h2
-rw-r--r--tools/perf/util/map.c44
-rw-r--r--tools/perf/util/map.h1
-rw-r--r--tools/perf/util/namespaces.c3
-rw-r--r--tools/perf/util/python.c10
-rw-r--r--tools/perf/util/s390-cpumsf-kernel.h71
-rw-r--r--tools/perf/util/s390-cpumsf.c945
-rw-r--r--tools/perf/util/s390-cpumsf.h21
-rw-r--r--tools/perf/util/scripting-engines/trace-event-perl.c2
-rw-r--r--tools/perf/util/scripting-engines/trace-event-python.c6
-rw-r--r--tools/perf/util/setup.py10
-rw-r--r--tools/perf/util/sort.c16
-rw-r--r--tools/perf/util/sort.h2
-rw-r--r--tools/perf/util/trace-event-parse.c34
-rw-r--r--tools/perf/util/trace-event-read.c44
-rw-r--r--tools/perf/util/trace-event-scripting.c4
-rw-r--r--tools/perf/util/trace-event.c28
-rw-r--r--tools/perf/util/trace-event.h20
68 files changed, 2915 insertions, 1346 deletions
diff --git a/tools/lib/lockdep/Makefile b/tools/lib/lockdep/Makefile
index 9b0ca3ad1ef3..9dafb8cb752f 100644
--- a/tools/lib/lockdep/Makefile
+++ b/tools/lib/lockdep/Makefile
@@ -129,12 +129,12 @@ $(OUTPUT)liblockdep.a: $(LIB_IN)
tags: force
$(RM) tags
find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px \
- --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/'
+ --regex-c++='/_PE\(([^,)]*).*/TEP_ERRNO__\1/'
TAGS: force
$(RM) TAGS
find . -name '*.[ch]' | xargs etags \
- --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/'
+ --regex='/_PE(\([^,)]*\).*/TEP_ERRNO__\1/'
define do_install
$(print_install) \
diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 46cd5f871ad7..0b4e833088a4 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -233,12 +233,12 @@ endef
tags: force
$(RM) tags
find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px \
- --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/'
+ --regex-c++='/_PE\(([^,)]*).*/TEP_ERRNO__\1/'
TAGS: force
$(RM) TAGS
find . -name '*.[ch]' | xargs etags \
- --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/'
+ --regex='/_PE(\([^,)]*\).*/TEP_ERRNO__\1/'
define do_install_mkdir
if [ ! -d '$(DESTDIR_SQ)$1' ]; then \
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index e5f2acbb70cc..6313e32680ff 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -73,12 +73,12 @@ static void init_input_buf(const char *buf, unsigned long long size)
input_buf_ptr = 0;
}
-const char *pevent_get_input_buf(void)
+const char *tep_get_input_buf(void)
{
return input_buf;
}
-unsigned long long pevent_get_input_buf_ptr(void)
+unsigned long long tep_get_input_buf_ptr(void)
{
return input_buf_ptr;
}
@@ -88,21 +88,21 @@ struct event_handler {
int id;
const char *sys_name;
const char *event_name;
- pevent_event_handler_func func;
+ tep_event_handler_func func;
void *context;
};
-struct pevent_func_params {
- struct pevent_func_params *next;
- enum pevent_func_arg_type type;
+struct func_params {
+ struct func_params *next;
+ enum tep_func_arg_type type;
};
-struct pevent_function_handler {
- struct pevent_function_handler *next;
- enum pevent_func_arg_type ret_type;
+struct tep_function_handler {
+ struct tep_function_handler *next;
+ enum tep_func_arg_type ret_type;
char *name;
- pevent_func_handler func;
- struct pevent_func_params *params;
+ tep_func_handler func;
+ struct func_params *params;
int nr_args;
};
@@ -110,17 +110,17 @@ static unsigned long long
process_defined_func(struct trace_seq *s, void *data, int size,
struct event_format *event, struct print_arg *arg);
-static void free_func_handle(struct pevent_function_handler *func);
+static void free_func_handle(struct tep_function_handler *func);
/**
- * pevent_buffer_init - init buffer for parsing
+ * tep_buffer_init - init buffer for parsing
* @buf: buffer to parse
* @size: the size of the buffer
*
- * For use with pevent_read_token(), this initializes the internal
- * buffer that pevent_read_token() will parse.
+ * For use with tep_read_token(), this initializes the internal
+ * buffer that tep_read_token() will parse.
*/
-void pevent_buffer_init(const char *buf, unsigned long long size)
+void tep_buffer_init(const char *buf, unsigned long long size)
{
init_input_buf(buf, size);
}
@@ -160,7 +160,7 @@ struct cmdline_list {
int pid;
};
-static int cmdline_init(struct pevent *pevent)
+static int cmdline_init(struct tep_handle *pevent)
{
struct cmdline_list *cmdlist = pevent->cmdlist;
struct cmdline_list *item;
@@ -189,7 +189,7 @@ static int cmdline_init(struct pevent *pevent)
return 0;
}
-static const char *find_cmdline(struct pevent *pevent, int pid)
+static const char *find_cmdline(struct tep_handle *pevent, int pid)
{
const struct cmdline *comm;
struct cmdline key;
@@ -211,14 +211,14 @@ static const char *find_cmdline(struct pevent *pevent, int pid)
}
/**
- * pevent_pid_is_registered - return if a pid has a cmdline registered
+ * tep_pid_is_registered - return if a pid has a cmdline registered
* @pevent: handle for the pevent
* @pid: The pid to check if it has a cmdline registered with.
*
* Returns 1 if the pid has a cmdline mapped to it
* 0 otherwise.
*/
-int pevent_pid_is_registered(struct pevent *pevent, int pid)
+int tep_pid_is_registered(struct tep_handle *pevent, int pid)
{
const struct cmdline *comm;
struct cmdline key;
@@ -244,7 +244,7 @@ int pevent_pid_is_registered(struct pevent *pevent, int pid)
* we must add this pid. This is much slower than when cmdlines
* are added before the array is initialized.
*/
-static int add_new_comm(struct pevent *pevent, const char *comm, int pid)
+static int add_new_comm(struct tep_handle *pevent, const char *comm, int pid)
{
struct cmdline *cmdlines = pevent->cmdlines;
const struct cmdline *cmdline;
@@ -288,7 +288,7 @@ static int add_new_comm(struct pevent *pevent, const char *comm, int pid)
}
/**
- * pevent_register_comm - register a pid / comm mapping
+ * tep_register_comm - register a pid / comm mapping
* @pevent: handle for the pevent
* @comm: the command line to register
* @pid: the pid to map the command line to
@@ -296,7 +296,7 @@ static int add_new_comm(struct pevent *pevent, const char *comm, int pid)
* This adds a mapping to search for command line names with
* a given pid. The comm is duplicated.
*/
-int pevent_register_comm(struct pevent *pevent, const char *comm, int pid)
+int tep_register_comm(struct tep_handle *pevent, const char *comm, int pid)
{
struct cmdline_list *item;
@@ -324,7 +324,7 @@ int pevent_register_comm(struct pevent *pevent, const char *comm, int pid)
return 0;
}
-int pevent_register_trace_clock(struct pevent *pevent, const char *trace_clock)
+int tep_register_trace_clock(struct tep_handle *pevent, const char *trace_clock)
{
pevent->trace_clock = strdup(trace_clock);
if (!pevent->trace_clock) {
@@ -381,7 +381,7 @@ static int func_bcmp(const void *a, const void *b)
return 1;
}
-static int func_map_init(struct pevent *pevent)
+static int func_map_init(struct tep_handle *pevent)
{
struct func_list *funclist;
struct func_list *item;
@@ -421,7 +421,7 @@ static int func_map_init(struct pevent *pevent)
}
static struct func_map *
-__find_func(struct pevent *pevent, unsigned long long addr)
+__find_func(struct tep_handle *pevent, unsigned long long addr)
{
struct func_map *func;
struct func_map key;
@@ -438,13 +438,13 @@ __find_func(struct pevent *pevent, unsigned long long addr)
}
struct func_resolver {
- pevent_func_resolver_t *func;
- void *priv;
- struct func_map map;
+ tep_func_resolver_t *func;
+ void *priv;
+ struct func_map map;
};
/**
- * pevent_set_function_resolver - set an alternative function resolver
+ * tep_set_function_resolver - set an alternative function resolver
* @pevent: handle for the pevent
* @resolver: function to be used
* @priv: resolver function private state.
@@ -453,8 +453,8 @@ struct func_resolver {
* keep using it instead of duplicating all the entries inside
* pevent->funclist.
*/
-int pevent_set_function_resolver(struct pevent *pevent,
- pevent_func_resolver_t *func, void *priv)
+int tep_set_function_resolver(struct tep_handle *pevent,
+ tep_func_resolver_t *func, void *priv)
{
struct func_resolver *resolver = malloc(sizeof(*resolver));
@@ -471,20 +471,20 @@ int pevent_set_function_resolver(struct pevent *pevent,
}
/**
- * pevent_reset_function_resolver - reset alternative function resolver
+ * tep_reset_function_resolver - reset alternative function resolver
* @pevent: handle for the pevent
*
* Stop using whatever alternative resolver was set, use the default
* one instead.
*/
-void pevent_reset_function_resolver(struct pevent *pevent)
+void tep_reset_function_resolver(struct tep_handle *pevent)
{
free(pevent->func_resolver);
pevent->func_resolver = NULL;
}
static struct func_map *
-find_func(struct pevent *pevent, unsigned long long addr)
+find_func(struct tep_handle *pevent, unsigned long long addr)
{
struct func_map *map;
@@ -503,7 +503,7 @@ find_func(struct pevent *pevent, unsigned long long addr)
}
/**
- * pevent_find_function - find a function by a given address
+ * tep_find_function - find a function by a given address
* @pevent: handle for the pevent
* @addr: the address to find the function with
*
@@ -511,7 +511,7 @@ find_func(struct pevent *pevent, unsigned long long addr)
* address. Note, the address does not have to be exact, it
* will select the function that would contain the address.
*/
-const char *pevent_find_function(struct pevent *pevent, unsigned long long addr)
+const char *tep_find_function(struct tep_handle *pevent, unsigned long long addr)
{
struct func_map *map;
@@ -523,16 +523,16 @@ const char *pevent_find_function(struct pevent *pevent, unsigned long long addr)
}
/**
- * pevent_find_function_address - find a function address by a given address
+ * tep_find_function_address - find a function address by a given address
* @pevent: handle for the pevent
* @addr: 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
+ * conjunction with tep_find_function to print both the function
* name and the function offset.
*/
unsigned long long
-pevent_find_function_address(struct pevent *pevent, unsigned long long addr)
+tep_find_function_address(struct tep_handle *pevent, unsigned long long addr)
{
struct func_map *map;
@@ -544,7 +544,7 @@ pevent_find_function_address(struct pevent *pevent, unsigned long long addr)
}
/**
- * pevent_register_function - register a function with a given address
+ * tep_register_function - register a function with a given address
* @pevent: handle for the pevent
* @function: the function name to register
* @addr: the address the function starts at
@@ -553,8 +553,8 @@ pevent_find_function_address(struct pevent *pevent, unsigned long long addr)
* This registers a function name with an address and module.
* The @func passed in is duplicated.
*/
-int pevent_register_function(struct pevent *pevent, char *func,
- unsigned long long addr, char *mod)
+int tep_register_function(struct tep_handle *pevent, char *func,
+ unsigned long long addr, char *mod)
{
struct func_list *item = malloc(sizeof(*item));
@@ -589,12 +589,12 @@ out_free:
}
/**
- * pevent_print_funcs - print out the stored functions
+ * tep_print_funcs - print out the stored functions
* @pevent: handle for the pevent
*
* This prints out the stored functions.
*/
-void pevent_print_funcs(struct pevent *pevent)
+void tep_print_funcs(struct tep_handle *pevent)
{
int i;
@@ -636,7 +636,7 @@ static int printk_cmp(const void *a, const void *b)
return 0;
}
-static int printk_map_init(struct pevent *pevent)
+static int printk_map_init(struct tep_handle *pevent)
{
struct printk_list *printklist;
struct printk_list *item;
@@ -668,7 +668,7 @@ static int printk_map_init(struct pevent *pevent)
}
static struct printk_map *
-find_printk(struct pevent *pevent, unsigned long long addr)
+find_printk(struct tep_handle *pevent, unsigned long long addr)
{
struct printk_map *printk;
struct printk_map key;
@@ -685,7 +685,7 @@ find_printk(struct pevent *pevent, unsigned long long addr)
}
/**
- * pevent_register_print_string - register a string by its address
+ * tep_register_print_string - register a string by its address
* @pevent: handle for the pevent
* @fmt: the string format to register
* @addr: the address the string was located at
@@ -693,8 +693,8 @@ find_printk(struct pevent *pevent, unsigned long long addr)
* This registers a string by the address it was stored in the kernel.
* The @fmt passed in is duplicated.
*/
-int pevent_register_print_string(struct pevent *pevent, const char *fmt,
- unsigned long long addr)
+int tep_register_print_string(struct tep_handle *pevent, const char *fmt,
+ unsigned long long addr)
{
struct printk_list *item = malloc(sizeof(*item));
char *p;
@@ -732,12 +732,12 @@ out_free:
}
/**
- * pevent_print_printk - print out the stored strings
+ * tep_print_printk - print out the stored strings
* @pevent: handle for the pevent
*
* This prints the string formats that were stored.
*/
-void pevent_print_printk(struct pevent *pevent)
+void tep_print_printk(struct tep_handle *pevent)
{
int i;
@@ -756,7 +756,7 @@ static struct event_format *alloc_event(void)
return calloc(1, sizeof(struct event_format));
}
-static int add_event(struct pevent *pevent, struct event_format *event)
+static int add_event(struct tep_handle *pevent, struct event_format *event)
{
int i;
struct event_format **events = realloc(pevent->events, sizeof(event) *
@@ -913,11 +913,11 @@ static int __peek_char(void)
}
/**
- * pevent_peek_char - peek at the next character that will be read
+ * tep_peek_char - peek at the next character that will be read
*
* Returns the next character read, or -1 if end of buffer.
*/
-int pevent_peek_char(void)
+int tep_peek_char(void)
{
return __peek_char();
}
@@ -1157,24 +1157,24 @@ static enum event_type read_token(char **tok)
}
/**
- * pevent_read_token - access to utilites to use the pevent parser
+ * tep_read_token - access to utilites to use the pevent parser
* @tok: The token to return
*
* This will parse tokens from the string given by
- * pevent_init_data().
+ * tep_init_data().
*
* Returns the token type.
*/
-enum event_type pevent_read_token(char **tok)
+enum event_type tep_read_token(char **tok)
{
return read_token(tok);
}
/**
- * pevent_free_token - free a token returned by pevent_read_token
+ * tep_free_token - free a token returned by tep_read_token
* @token: the token to free
*/
-void pevent_free_token(char *token)
+void tep_free_token(char *token)
{
free_token(token);
}
@@ -2101,11 +2101,11 @@ process_entry(struct event_format *event __maybe_unused, struct print_arg *arg,
arg->field.name = field;
if (is_flag_field) {
- arg->field.field = pevent_find_any_field(event, arg->field.name);
+ arg->field.field = tep_find_any_field(event, arg->field.name);
arg->field.field->flags |= FIELD_IS_FLAG;
is_flag_field = 0;
} else if (is_symbolic_field) {
- arg->field.field = pevent_find_any_field(event, arg->field.name);
+ arg->field.field = tep_find_any_field(event, arg->field.name);
arg->field.field->flags |= FIELD_IS_SYMBOLIC;
is_symbolic_field = 0;
}
@@ -2714,7 +2714,7 @@ process_dynamic_array(struct event_format *event, struct print_arg *arg, char **
/* Find the field */
- field = pevent_find_field(event, token);
+ field = tep_find_field(event, token);
if (!field)
goto out_free;
@@ -2771,7 +2771,7 @@ process_dynamic_array_len(struct event_format *event, struct print_arg *arg,
arg->type = PRINT_DYNAMIC_ARRAY_LEN;
/* Find the field */
- field = pevent_find_field(event, token);
+ field = tep_find_field(event, token);
if (!field)
goto out_free;
@@ -2914,10 +2914,10 @@ process_bitmask(struct event_format *event __maybe_unused, struct print_arg *arg
return EVENT_ERROR;
}
-static struct pevent_function_handler *
-find_func_handler(struct pevent *pevent, char *func_name)
+static struct tep_function_handler *
+find_func_handler(struct tep_handle *pevent, char *func_name)
{
- struct pevent_function_handler *func;
+ struct tep_function_handler *func;
if (!pevent)
return NULL;
@@ -2930,10 +2930,10 @@ find_func_handler(struct pevent *pevent, char *func_name)
return func;
}
-static void remove_func_handler(struct pevent *pevent, char *func_name)
+static void remove_func_handler(struct tep_handle *pevent, char *func_name)
{
- struct pevent_function_handler *func;
- struct pevent_function_handler **next;
+ struct tep_function_handler *func;
+ struct tep_function_handler **next;
next = &pevent->func_handlers;
while ((func = *next)) {
@@ -2947,7 +2947,7 @@ static void remove_func_handler(struct pevent *pevent, char *func_name)
}
static enum event_type
-process_func_handler(struct event_format *event, struct pevent_function_handler *func,
+process_func_handler(struct event_format *event, struct tep_function_handler *func,
struct print_arg *arg, char **tok)
{
struct print_arg **next_arg;
@@ -3008,7 +3008,7 @@ static enum event_type
process_function(struct event_format *event, struct print_arg *arg,
char *token, char **tok)
{
- struct pevent_function_handler *func;
+ struct tep_function_handler *func;
if (strcmp(token, "__print_flags") == 0) {
free_token(token);
@@ -3265,7 +3265,7 @@ static int event_read_print(struct event_format *event)
}
/**
- * pevent_find_common_field - return a common field by event
+ * tep_find_common_field - return a common field by event
* @event: handle for the event
* @name: the name of the common field to return
*
@@ -3273,7 +3273,7 @@ static int event_read_print(struct event_format *event)
* This only searchs the common fields and not all field.
*/
struct format_field *
-pevent_find_common_field(struct event_format *event, const char *name)
+tep_find_common_field(struct event_format *event, const char *name)
{