aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/hists_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/hists_common.h')
-rw-r--r--tools/perf/tests/hists_common.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/tools/perf/tests/hists_common.h b/tools/perf/tests/hists_common.h
new file mode 100644
index 000000000000..1415ae69d7b6
--- /dev/null
+++ b/tools/perf/tests/hists_common.h
@@ -0,0 +1,47 @@
1#ifndef __PERF_TESTS__HISTS_COMMON_H__
2#define __PERF_TESTS__HISTS_COMMON_H__
3
4struct machine;
5struct machines;
6
7/*
8 * The setup_fake_machine() provides a test environment which consists
9 * of 3 processes that have 3 mappings and in turn, have 3 symbols
10 * respectively. See below table:
11 *
12 * Command: Pid Shared Object Symbol
13 * ............. ............. ...................
14 * perf: 100 perf main
15 * perf: 100 perf run_command
16 * perf: 100 perf comd_record
17 * perf: 100 libc malloc
18 * perf: 100 libc free
19 * perf: 100 libc realloc
20 * perf: 100 [kernel] schedule
21 * perf: 100 [kernel] page_fault
22 * perf: 100 [kernel] sys_perf_event_open
23 * perf: 200 perf main
24 * perf: 200 perf run_command
25 * perf: 200 perf comd_record
26 * perf: 200 libc malloc
27 * perf: 200 libc free
28 * perf: 200 libc realloc
29 * perf: 200 [kernel] schedule
30 * perf: 200 [kernel] page_fault
31 * perf: 200 [kernel] sys_perf_event_open
32 * bash: 300 bash main
33 * bash: 300 bash xmalloc
34 * bash: 300 bash xfree
35 * bash: 300 libc malloc
36 * bash: 300 libc free
37 * bash: 300 libc realloc
38 * bash: 300 [kernel] schedule
39 * bash: 300 [kernel] page_fault
40 * bash: 300 [kernel] sys_perf_event_open
41 */
42struct machine *setup_fake_machine(struct machines *machines);
43
44void print_hists_in(struct hists *hists);
45void print_hists_out(struct hists *hists);
46
47#endif /* __PERF_TESTS__HISTS_COMMON_H__ */