forked from google/bloaty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom_sources.bloaty
113 lines (106 loc) · 4.22 KB
/
custom_sources.bloaty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Custom data sources that are generally useful, so we ship them
# with Bloaty.
##
# class_or_namespace: grabs everything up until the last "::".
#
# This is especially useful when paired with shortsymbols, eg.
#
# VM SIZE FILE SIZE
# -------------- --------------
# 37.6% 4.18Mi [None] 4.17Mi 37.6%
# 30.9% 3.44Mi [Other] 3.44Mi 30.9%
# 5.7% 648Ki insns 648Ki 5.7%
# 2.9% 330Ki printAliasInstr 330Ki 2.9%
# 2.9% 326Ki __cxxabiv1::(anonymous namespace) 326Ki 2.9%
# 23.6% 77.1Ki [Other] 77.1Ki 23.6%
# 12.7% 41.5Ki __cxxabiv1::(anonymous namespace)::parse_type<>() 41.5Ki 12.7%
# 10.1% 32.9Ki __cxxabiv1::(anonymous namespace)::parse_expression<>() 32.9Ki 10.1%
# <...>
# 2.7% 306Ki std::__1::__tree<> 306Ki 2.7%
# 27.2% 83.3Ki std::__1::__tree<>::__find_equal<>() 83.3Ki 27.2%
# 20.9% 64.0Ki std::__1::__tree<>::__construct_node() 64.0Ki 20.9%
# 12.6% 38.8Ki std::__1::__tree<>::find<>() 38.8Ki 12.6%
# <...>
# 2.2% 247Ki std::__1::__hash_table<> 247Ki 2.2%
# 23.6% 58.5Ki std::__1::__hash_table<>::__rehash() 58.5Ki 23.6%
# 20.3% 50.2Ki std::__1::__hash_table<>::__construct_node_hash() 50.2Ki 20.3%
# 15.4% 38.2Ki std::__1::__hash_table<>::find<>() 38.2Ki 15.4%
# <...>
# 1.8% 208Ki google::protobuf 207Ki 1.8%
# 35.2% 73.2Ki google::protobuf::InsertIfNotPresent<>() 73.2Ki 35.2%
# 25.8% 53.7Ki [Other] 53.4Ki 25.7%
# 6.1% 12.7Ki google::protobuf::StrCat() 12.7Ki 6.1%
# <...>
#
# etc.
custom_data_source: {
name: "class_or_namespace"
base_data_source: "shortsymbols"
rewrite: {
pattern: "^(.*)::[^:]+$"
replacement: "\\1"
}
}
##
# stripped_sections: the base section name
#
# This is useful when you are profiling object files that you have compiled
# with -ffunction-sections/-fdata-sections. Normally this makes "-d sections"
# very noisy, because every function has a distinct section name. This
# removes the noise and gives you a base section name.
custom_data_source: {
name: "stripped_sections"
base_data_source: "sections"
rewrite: {
pattern: "^\\.text"
replacement: ".text"
}
rewrite: {
pattern: "^\\.data.rel.ro"
replacement: ".data.rel.ro"
}
rewrite: {
pattern: "^\\.data"
replacement: ".data"
}
rewrite: {
pattern: "^\\.rela\\.text"
replacement: ".rela.text"
}
rewrite: {
pattern: "^.rela.data.rel.ro"
replacement: ".rela.data.rel.ro"
}
rewrite: {
pattern: "^.rela.rodata"
replacement: ".rela.rodata"
}
rewrite: {
pattern: "^.rela.data"
replacement: ".rela.data"
}
rewrite: {
pattern: "^.tdata"
replacement: ".tdata"
}
rewrite: {
pattern: "^.rodata"
replacement: ".rodata"
}
rewrite: {
pattern: "^.bss"
replacement: ".bss"
}
rewrite: {
pattern: "^.tbss"
replacement: ".tbss"
}
}
custom_data_source: {
name: "section_prefix"
base_data_source: "sections"
rewrite: {
pattern: "^(\\.[^.]+)"
replacement: "\\1"
}
}