Commit 1fc013d
committed
amalgamated C SDK: drop C++ implementation files unused by the C ABI
Source: 5,727,555 → 5,557,692 bytes (-169,863 = -3.0%)
Binary: 6,049,608 → 5,904,712 bytes (-O0, -141 KB)
Binary: 2,265,688 → 2,220,504 bytes (-O2, -44 KB / -2.0%)
Compile: 9.7s → 9.5s (-O0); 31.0s → 30.1s (-O2)
Drop two groups of C++ source files that are part of the SDK's GN closure
but unreachable from the C ABI surface in include/perfetto/public/abi/.
src/tracing/BUILD.gn (gated under enable_perfetto_minimal_trace_protos):
console_interceptor.cc — pretty-printed console output for
in-process trace readback. Public C++
only (ConsoleInterceptor::Register);
nothing in include/perfetto/public/
references it.
track_event_state_tracker.cc — helper for replaying TrackEvent state in
a consumer; only used by
console_interceptor.cc.
track_event_legacy.cc — implementation of LegacyTraceId::Write.
The class is constructed only inside
`#if PERFETTO_ENABLE_LEGACY_TRACE_EVENTS`
blocks (off by default), so the .cc
symbol is dead.
src/base/BUILD.gn:
cpu_info.cc — used only by profiling and system_info data sources.
ctrl_c_handler.cc — used only by perfetto_cmd.
getopt_compat.cc — Windows getopt fallback used only by command-line
tools.
subprocess.cc + posix/windows variants — used only by tests and host
tools (perfetto_cmd, kallsyms loader, etc.).
All audit checks: zero non-test #include sites under src/{shared_lib,
tracing,protozero,protovm,ipc,base}/ and include/perfetto/{public,
tracing,ext/tracing}/ (excluding the dropped files' own self-references).1 parent 0acaa29 commit 1fc013d
2 files changed
Lines changed: 34 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
44 | | - | |
45 | 42 | | |
46 | 43 | | |
47 | 44 | | |
| |||
70 | 67 | | |
71 | 68 | | |
72 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
73 | 81 | | |
74 | 82 | | |
75 | 83 | | |
| |||
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
81 | | - | |
| 89 | + | |
82 | 90 | | |
83 | 91 | | |
84 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
| |||
106 | 105 | | |
107 | 106 | | |
108 | 107 | | |
109 | | - | |
110 | | - | |
111 | 108 | | |
112 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
113 | 132 | | |
114 | 133 | | |
115 | 134 | | |
| |||
0 commit comments