traced_perf: re-enable linux build + add x86 regs handling
We need the kernel UAPI headers for the perf regs enums, I'm sourcing
them from buildtools/bionic, as with the in-tree builds.
I've previously promised to look into explicit reassignments instead of
memcpy/loop for arm/arm64, but ended up keeping them, as there's no
really sensible enum to index the "user" regs by (I'm not exactly sure
whether MachineArm64.h is the conceptually right enum either, but that's
what's used in practice, and all of these layouts match anyway).
Bug: 144281346
Change-Id: Id4a388e3772ce10b0f8aa43b6a30f8f43e91c93d
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index 0962c9b..b00f447 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -273,13 +273,20 @@
} # if (enable_perfetto_trace_processor_linenoise)
# Only used by src/profiling in standalone and android builds.
-if (enable_perfetto_heapprofd) {
+if (enable_perfetto_heapprofd || enable_perfetto_traced_perf) {
group("libunwindstack") {
public_configs = [ "//buildtools:libunwindstack_config" ]
public_deps = [ "//buildtools:libunwindstack" ]
}
}
+# Used by src/profiling/perf for perf_regs.h.
+if (enable_perfetto_traced_perf) {
+ group("bionic_kernel_uapi_headers") {
+ public_configs = [ "//buildtools:bionic_kernel_uapi_headers" ]
+ }
+}
+
# Zlib is used both by trace_processor and by perfetto_cmd.
if (enable_perfetto_zlib) {
group("zlib") {