Create linux.system_info probe reporting CpuInfo
The new probe reports only basic CPU information:
- "processor" value from /proc/cpuinfo
- frequencies from
/sys/devices/system/cpu/cpuX/cpufreq/scaling_available_frequencies
It is the first building block of the coarse CPU data source.
Bug: 153092449
Test: perfetto_unittests
Change-Id: I0158f6c2918531a5da2438cfc541644f1869e612
diff --git a/BUILD b/BUILD
index 042d95a..235efe7 100644
--- a/BUILD
+++ b/BUILD
@@ -153,6 +153,7 @@
":protos_perfetto_trace_profiling_zero",
":protos_perfetto_trace_ps_zero",
":protos_perfetto_trace_sys_stats_zero",
+ ":protos_perfetto_trace_system_info_zero",
":protos_perfetto_trace_track_event_zero",
],
)
@@ -182,6 +183,7 @@
":src_traced_probes_probes_src",
":src_traced_probes_ps_ps",
":src_traced_probes_sys_stats_sys_stats",
+ ":src_traced_probes_system_info_system_info",
":src_traced_service_service",
":src_tracing_common",
":src_tracing_consumer_api_deprecated_consumer_api_deprecated",
@@ -245,6 +247,7 @@
":protos_perfetto_trace_profiling_zero",
":protos_perfetto_trace_ps_zero",
":protos_perfetto_trace_sys_stats_zero",
+ ":protos_perfetto_trace_system_info_zero",
":protos_perfetto_trace_track_event_zero",
],
linkstatic = True,
@@ -1150,6 +1153,15 @@
],
)
+# GN target: //src/traced/probes/system_info:system_info
+filegroup(
+ name = "src_traced_probes_system_info_system_info",
+ srcs = [
+ "src/traced/probes/system_info/system_info_data_source.cc",
+ "src/traced/probes/system_info/system_info_data_source.h",
+ ],
+)
+
# GN target: //src/traced/probes:data_source
filegroup(
name = "src_traced_probes_data_source",
@@ -2290,6 +2302,7 @@
":protos_perfetto_trace_profiling_protos",
":protos_perfetto_trace_ps_protos",
":protos_perfetto_trace_sys_stats_protos",
+ ":protos_perfetto_trace_system_info_protos",
":protos_perfetto_trace_track_event_protos",
],
)
@@ -2482,6 +2495,33 @@
],
)
+# GN target: //protos/perfetto/trace/system_info:lite
+perfetto_cc_proto_library(
+ name = "protos_perfetto_trace_system_info_lite",
+ deps = [
+ ":protos_perfetto_trace_system_info_protos",
+ ],
+)
+
+# GN target: //protos/perfetto/trace/system_info:zero
+perfetto_proto_library(
+ name = "protos_perfetto_trace_system_info_protos",
+ srcs = [
+ "protos/perfetto/trace/system_info/cpu_info.proto",
+ ],
+ visibility = [
+ PERFETTO_CONFIG.proto_library_visibility,
+ ],
+)
+
+# GN target: //protos/perfetto/trace/system_info:zero
+perfetto_cc_protozero_library(
+ name = "protos_perfetto_trace_system_info_zero",
+ deps = [
+ ":protos_perfetto_trace_system_info_protos",
+ ],
+)
+
# GN target: //protos/perfetto/trace/track_event:lite
perfetto_cc_proto_library(
name = "protos_perfetto_trace_track_event_lite",
@@ -2643,6 +2683,7 @@
":protos_perfetto_trace_profiling_zero",
":protos_perfetto_trace_ps_zero",
":protos_perfetto_trace_sys_stats_zero",
+ ":protos_perfetto_trace_system_info_zero",
":protos_perfetto_trace_track_event_zero",
],
linkstatic = True,
@@ -2721,6 +2762,7 @@
":protos_perfetto_trace_profiling_zero",
":protos_perfetto_trace_ps_zero",
":protos_perfetto_trace_sys_stats_zero",
+ ":protos_perfetto_trace_system_info_zero",
":protos_perfetto_trace_track_event_zero",
":src_perfetto_cmd_protos",
] + PERFETTO_CONFIG.deps.zlib,
@@ -2787,6 +2829,7 @@
":protos_perfetto_trace_profiling_zero",
":protos_perfetto_trace_ps_zero",
":protos_perfetto_trace_sys_stats_zero",
+ ":protos_perfetto_trace_system_info_zero",
":protos_perfetto_trace_track_event_zero",
] + PERFETTO_CONFIG.deps.jsoncpp +
PERFETTO_CONFIG.deps.sqlite +
@@ -2865,6 +2908,7 @@
":protos_perfetto_trace_profiling_zero",
":protos_perfetto_trace_ps_zero",
":protos_perfetto_trace_sys_stats_zero",
+ ":protos_perfetto_trace_system_info_zero",
":protos_perfetto_trace_track_event_zero",
] + PERFETTO_CONFIG.deps.jsoncpp +
PERFETTO_CONFIG.deps.linenoise +
@@ -2954,6 +2998,7 @@
":protos_perfetto_trace_profiling_zero",
":protos_perfetto_trace_ps_zero",
":protos_perfetto_trace_sys_stats_zero",
+ ":protos_perfetto_trace_system_info_zero",
":protos_perfetto_trace_track_event_zero",
":protos_third_party_pprof_zero",
] + PERFETTO_CONFIG.deps.zlib,
@@ -3028,6 +3073,7 @@
":protos_perfetto_trace_profiling_zero",
":protos_perfetto_trace_ps_zero",
":protos_perfetto_trace_sys_stats_zero",
+ ":protos_perfetto_trace_system_info_zero",
":protos_perfetto_trace_track_event_zero",
":protos_third_party_pprof_zero",
] + PERFETTO_CONFIG.deps.jsoncpp +