14 #include <linux/kernel.h> 63 for (i = 0; i < ARRAY_SIZE(fake_samples); i++) {
68 .hide_unresolved =
false,
77 sample.
cpumode = PERF_RECORD_MISC_USER;
78 sample.
pid = fake_samples[i].
pid;
79 sample.
tid = fake_samples[i].
pid;
80 sample.
ip = fake_samples[i].
ip;
93 fake_samples[i].
map = al.
map;
94 fake_samples[i].
sym = al.
sym;
101 pr_debug(
"Not enough memory for adding a hist entry\n");
173 pr_info(
"Histogram for thread filter\n");
202 pr_info(
"Histogram for dso filter\n");
237 pr_info(
"Histogram for symbol filter\n");
266 pr_info(
"Histogram for socket filters\n");
297 pr_info(
"Histogram for all filters\n");
#define FAKE_IP_BASH_XMALLOC
static void setup_sorting(struct perf_sched *sched, const struct option *options, const char *const usage_msg[])
void hists__filter_by_symbol(struct hists *hists)
struct perf_sample * sample
void machines__exit(struct machines *machines)
int machine__resolve(struct machine *machine, struct addr_location *al, struct perf_sample *sample)
void reset_output_field(void)
int hists__collapse_resort(struct hists *hists, struct ui_progress *prog)
#define FAKE_IP_LIBC_MALLOC
#define TEST_ASSERT_VAL(text, cond)
u64 nr_non_filtered_entries
void perf_evlist__delete(struct perf_evlist *evlist)
static struct hists * evsel__hists(struct perf_evsel *evsel)
int parse_events(struct perf_evlist *evlist, const char *str, struct parse_events_error *err)
void addr_location__put(struct addr_location *al)
static struct sample fake_samples[]
#define pr_debug(fmt,...)
#define FAKE_IP_PERF_MAIN
#define FAKE_IP_KERNEL_SCHEDULE
#define evlist__for_each_entry(evlist, evsel)
u32 nr_non_filtered_samples
static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
const struct dso * dso_filter
const char * symbol_filter_str
#define FAKE_IP_PERF_CMD_RECORD
int test__hists_filter(struct test *test __maybe_unused, int subtest __maybe_unused)
struct thread * thread_filter
const struct hist_iter_ops hist_iter_normal
void hists__filter_by_socket(struct hists *hists)
void machines__init(struct machines *machines)
void print_hists_out(struct hists *hists)
void hists__filter_by_thread(struct hists *hists)
#define FAKE_IP_BASH_MAIN
struct perf_evsel * evsel
struct events_stats stats
u32 nr_events[PERF_RECORD_HEADER_MAX]
void hists__filter_by_dso(struct hists *hists)
#define FAKE_IP_KERNEL_PAGE_FAULT
void perf_evsel__output_resort(struct perf_evsel *evsel, struct ui_progress *prog)
struct machine * setup_fake_machine(struct machines *machines)
u64 total_non_filtered_period
int sysctl_perf_event_max_stack
size_t machine__fprintf(struct machine *machine, FILE *fp)
struct perf_evlist * perf_evlist__new(void)
int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al, int max_stack_depth, void *arg)