Linux Perf
|
#include "builtin.h"
#include "perf.h"
#include "util/evlist.h"
#include "util/evsel.h"
#include "util/util.h"
#include "util/config.h"
#include "util/symbol.h"
#include "util/thread.h"
#include "util/header.h"
#include "util/session.h"
#include "util/tool.h"
#include "util/callchain.h"
#include "util/time-utils.h"
#include <subcmd/parse-options.h>
#include "util/trace-event.h"
#include "util/data.h"
#include "util/cpumap.h"
#include "util/debug.h"
#include <linux/kernel.h>
#include <linux/rbtree.h>
#include <linux/string.h>
#include <errno.h>
#include <inttypes.h>
#include <locale.h>
#include <regex.h>
#include "sane_ctype.h"
Go to the source code of this file.
Classes | |
struct | alloc_stat |
struct | page_stat |
struct | alloc_func |
struct | sort_dimension |
struct | gfp_flag |
Macros | |
#define | MAX_MIGRATE_TYPES 6 |
#define | MAX_PAGE_ORDER 11 |
Typedefs | |
typedef int(* | sort_fn_t) (void *, void *) |
typedef int(* | tracepoint_handler) (struct perf_evsel *evsel, struct perf_sample *sample) |
Enumerations | |
enum | { KMEM_SLAB, KMEM_PAGE } |
Functions | |
static int | insert_alloc_stat (unsigned long call_site, unsigned long ptr, int bytes_req, int bytes_alloc, int cpu) |
static int | insert_caller_stat (unsigned long call_site, int bytes_req, int bytes_alloc) |
static int | perf_evsel__process_alloc_event (struct perf_evsel *evsel, struct perf_sample *sample) |
static int | perf_evsel__process_alloc_node_event (struct perf_evsel *evsel, struct perf_sample *sample) |
static int | ptr_cmp (void *, void *) |
static int | slab_callsite_cmp (void *, void *) |
static struct alloc_stat * | search_alloc_stat (unsigned long ptr, unsigned long call_site, struct rb_root *root, sort_fn_t sort_fn) |
static int | perf_evsel__process_free_event (struct perf_evsel *evsel, struct perf_sample *sample) |
static int | funcmp (const void *a, const void *b) |
static int | callcmp (const void *a, const void *b) |
static int | build_alloc_func_list (void) |
static u64 | find_callsite (struct perf_evsel *evsel, struct perf_sample *sample) |
static | LIST_HEAD (page_alloc_sort_input) |
static | LIST_HEAD (page_caller_sort_input) |
static struct page_stat * | __page_stat__findnew_page (struct page_stat *pstat, bool create) |
static struct page_stat * | page_stat__find_page (struct page_stat *pstat) |
static struct page_stat * | page_stat__findnew_page (struct page_stat *pstat) |
static struct page_stat * | __page_stat__findnew_alloc (struct page_stat *pstat, bool create) |
static struct page_stat * | page_stat__find_alloc (struct page_stat *pstat) |
static struct page_stat * | page_stat__findnew_alloc (struct page_stat *pstat) |
static struct page_stat * | __page_stat__findnew_caller (struct page_stat *pstat, bool create) |
static struct page_stat * | page_stat__find_caller (struct page_stat *pstat) |
static struct page_stat * | page_stat__findnew_caller (struct page_stat *pstat) |
static bool | valid_page (u64 pfn_or_page) |
static int | gfpcmp (const void *a, const void *b) |
static char * | compact_gfp_flags (char *gfp_flags) |
static char * | compact_gfp_string (unsigned long gfp_flags) |
static int | parse_gfp_flags (struct perf_evsel *evsel, struct perf_sample *sample, unsigned int gfp_flags) |
static int | perf_evsel__process_page_alloc_event (struct perf_evsel *evsel, struct perf_sample *sample) |
static int | perf_evsel__process_page_free_event (struct perf_evsel *evsel, struct perf_sample *sample) |
static bool | perf_kmem__skip_sample (struct perf_sample *sample) |
static int | process_sample_event (struct perf_tool *tool __maybe_unused, union perf_event *event, struct perf_sample *sample, struct perf_evsel *evsel, struct machine *machine) |
static double | fragmentation (unsigned long n_req, unsigned long n_alloc) |
static void | __print_slab_result (struct rb_root *root, struct perf_session *session, int n_lines, int is_caller) |
static void | __print_page_alloc_result (struct perf_session *session, int n_lines) |
static void | __print_page_caller_result (struct perf_session *session, int n_lines) |
static void | print_gfp_flags (void) |
static void | print_slab_summary (void) |
static void | print_page_summary (void) |
static void | print_slab_result (struct perf_session *session) |
static void | print_page_result (struct perf_session *session) |
static void | print_result (struct perf_session *session) |
static | LIST_HEAD (slab_caller_sort) |
static | LIST_HEAD (slab_alloc_sort) |
static | LIST_HEAD (page_caller_sort) |
static | LIST_HEAD (page_alloc_sort) |
static void | sort_slab_insert (struct rb_root *root, struct alloc_stat *data, struct list_head *sort_list) |
static void | __sort_slab_result (struct rb_root *root, struct rb_root *root_sorted, struct list_head *sort_list) |
static void | sort_page_insert (struct rb_root *root, struct page_stat *data, struct list_head *sort_list) |
static void | __sort_page_result (struct rb_root *root, struct rb_root *root_sorted, struct list_head *sort_list) |
static void | sort_result (void) |
static int | __cmd_kmem (struct perf_session *session) |
static int | hit_cmp (void *a, void *b) |
static int | bytes_cmp (void *a, void *b) |
static int | frag_cmp (void *a, void *b) |
static int | pingpong_cmp (void *a, void *b) |
static int | page_cmp (void *a, void *b) |
static int | page_callsite_cmp (void *a, void *b) |
static int | page_hit_cmp (void *a, void *b) |
static int | page_bytes_cmp (void *a, void *b) |
static int | page_order_cmp (void *a, void *b) |
static int | migrate_type_cmp (void *a, void *b) |
static int | gfp_flags_cmp (void *a, void *b) |
static int | slab_sort_dimension__add (const char *tok, struct list_head *list) |
static int | page_sort_dimension__add (const char *tok, struct list_head *list) |
static int | setup_slab_sorting (struct list_head *sort_list, const char *arg) |
static int | setup_page_sorting (struct list_head *sort_list, const char *arg) |
static int | parse_sort_opt (const struct option *opt __maybe_unused, const char *arg, int unset __maybe_unused) |
static int | parse_caller_opt (const struct option *opt __maybe_unused, const char *arg __maybe_unused, int unset __maybe_unused) |
static int | parse_alloc_opt (const struct option *opt __maybe_unused, const char *arg __maybe_unused, int unset __maybe_unused) |
static int | parse_slab_opt (const struct option *opt __maybe_unused, const char *arg __maybe_unused, int unset __maybe_unused) |
static int | parse_page_opt (const struct option *opt __maybe_unused, const char *arg __maybe_unused, int unset __maybe_unused) |
static int | parse_line_opt (const struct option *opt __maybe_unused, const char *arg, int unset __maybe_unused) |
static int | __cmd_record (int argc, const char **argv) |
static int | kmem_config (const char *var, const char *value, void *cb __maybe_unused) |
int | cmd_kmem (int argc, const char **argv) |
#define MAX_MIGRATE_TYPES 6 |
Definition at line 270 of file builtin-kmem.c.
#define MAX_PAGE_ORDER 11 |
Definition at line 271 of file builtin-kmem.c.
typedef int(* sort_fn_t) (void *, void *) |
Definition at line 44 of file builtin-kmem.c.
typedef int(* tracepoint_handler) (struct perf_evsel *evsel, struct perf_sample *sample) |
Definition at line 931 of file builtin-kmem.c.
anonymous enum |
Enumerator | |
---|---|
KMEM_SLAB | |
KMEM_PAGE |
Definition at line 38 of file builtin-kmem.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1458 of file builtin-kmem.c.
|
static |
Definition at line 314 of file builtin-kmem.c.
int cmd_kmem | ( | int | argc, |
const char ** | argv | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 974 of file builtin-kmem.c.
|
static |
Definition at line 303 of file builtin-kmem.c.
|
static |
Definition at line 1620 of file builtin-kmem.c.
|
static |
Definition at line 613 of file builtin-kmem.c.
|
static |
Definition at line 1441 of file builtin-kmem.c.
|
static |
|
static |
|
static |
Definition at line 1875 of file builtin-kmem.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1599 of file builtin-kmem.c.
|
static |
Definition at line 1565 of file builtin-kmem.c.
|
static |
Definition at line 1531 of file builtin-kmem.c.
|
static |
Definition at line 1514 of file builtin-kmem.c.
|
static |
Definition at line 1548 of file builtin-kmem.c.
|
static |
Definition at line 1582 of file builtin-kmem.c.
|
static |
Definition at line 1680 of file builtin-kmem.c.
|
static |
Definition at line 1782 of file builtin-kmem.c.
|
static |
Definition at line 1774 of file builtin-kmem.c.
|
static |
|
static |
Definition at line 1806 of file builtin-kmem.c.
|
static |
Definition at line 1798 of file builtin-kmem.c.
|
static |
Definition at line 1790 of file builtin-kmem.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1496 of file builtin-kmem.c.
|
static |
Definition at line 1136 of file builtin-kmem.c.
|
static |
|
static |
Definition at line 1168 of file builtin-kmem.c.
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1407 of file builtin-kmem.c.
|
static |
Definition at line 205 of file builtin-kmem.c.
|
static |
|
static |
|
static |
Definition at line 1424 of file builtin-kmem.c.
|
static |
Definition at line 1660 of file builtin-kmem.c.
|
static |
Definition at line 1293 of file builtin-kmem.c.
|
static |
|
static |
Definition at line 1246 of file builtin-kmem.c.
|
static |
Definition at line 595 of file builtin-kmem.c.
|
static |
Definition at line 46 of file builtin-kmem.c.
|
static |
Definition at line 301 of file builtin-kmem.c.
|
static |
Definition at line 49 of file builtin-kmem.c.
|
static |
Definition at line 1470 of file builtin-kmem.c.
|
static |
Definition at line 47 of file builtin-kmem.c.
|
static |
Definition at line 50 of file builtin-kmem.c.
|
static |
Definition at line 1436 of file builtin-kmem.c.
const char* compact |
Definition at line 624 of file builtin-kmem.c.
|
static |
Definition at line 1491 of file builtin-kmem.c.
const { ... } gfp_compact_table[] |
|
static |
Definition at line 1636 of file builtin-kmem.c.
|
static |
Definition at line 610 of file builtin-kmem.c.
|
static |
Definition at line 1453 of file builtin-kmem.c.
enum { ... } kmem_default |
|
static |
Definition at line 35 of file builtin-kmem.c.
|
static |
Definition at line 37 of file builtin-kmem.c.
|
static |
Definition at line 268 of file builtin-kmem.c.
|
static |
Definition at line 34 of file builtin-kmem.c.
|
static |
Definition at line 267 of file builtin-kmem.c.
|
static |
Definition at line 663 of file builtin-kmem.c.
|
static |
Definition at line 1615 of file builtin-kmem.c.
|
static |
Definition at line 1036 of file builtin-kmem.c.
|
static |
Definition at line 300 of file builtin-kmem.c.
|
static |
Definition at line 74 of file builtin-kmem.c.
|
static |
Definition at line 74 of file builtin-kmem.c.
|
static |
Definition at line 611 of file builtin-kmem.c.
|
static |
Definition at line 261 of file builtin-kmem.c.
|
static |
Definition at line 263 of file builtin-kmem.c.
|
static |
Definition at line 262 of file builtin-kmem.c.
|
static |
Definition at line 264 of file builtin-kmem.c.
|
static |
Definition at line 273 of file builtin-kmem.c.
const char* original |
Definition at line 623 of file builtin-kmem.c.
|
static |
Definition at line 290 of file builtin-kmem.c.
|
static |
Definition at line 289 of file builtin-kmem.c.
|
static |
Definition at line 1577 of file builtin-kmem.c.
|
static |
Definition at line 292 of file builtin-kmem.c.
|
static |
Definition at line 291 of file builtin-kmem.c.
|
static |
Definition at line 1543 of file builtin-kmem.c.
|
static |
Definition at line 1560 of file builtin-kmem.c.
|
static |
Definition at line 288 of file builtin-kmem.c.
|
static |
Definition at line 1594 of file builtin-kmem.c.
|
static |
Definition at line 1526 of file builtin-kmem.c.
|
static |
Definition at line 1650 of file builtin-kmem.c.
|
static |
Definition at line 965 of file builtin-kmem.c.
|
static |
Definition at line 1508 of file builtin-kmem.c.
|
static |
Definition at line 77 of file builtin-kmem.c.
|
static |
Definition at line 1419 of file builtin-kmem.c.
|
static |
Definition at line 52 of file builtin-kmem.c.
|
static |
Definition at line 69 of file builtin-kmem.c.
|
static |
Definition at line 68 of file builtin-kmem.c.
|
static |
Definition at line 71 of file builtin-kmem.c.
|
static |
Definition at line 70 of file builtin-kmem.c.
|
static |
Definition at line 1641 of file builtin-kmem.c.
const char* time_str |
Definition at line 78 of file builtin-kmem.c.
|
static |
Definition at line 73 of file builtin-kmem.c.
|
static |
Definition at line 73 of file builtin-kmem.c.
|
static |
Definition at line 257 of file builtin-kmem.c.
|
static |
Definition at line 260 of file builtin-kmem.c.
|
static |
Definition at line 258 of file builtin-kmem.c.
|
static |
Definition at line 259 of file builtin-kmem.c.
|
static |
Definition at line 73 of file builtin-kmem.c.
|
static |
Definition at line 266 of file builtin-kmem.c.