Support perfetto track_event prefer

Trace.java now supports per-category tracing to perfetto if specified
in the config. When we trace to perfetto, the event will be missing from
the ftrace buffer. This means that a concurrent session that has the
same category enabled for atrace will be missing the atrace event.
To avoid this, the config can specify that the perfetto event can be
preferred. This means that despite the category being enabled for
atrace, we will trace to perfetto if the category is enabled there.

By default, the perfetto event is not preferred, but it can be preferred
explicitly in the config with atrace_categories_prefer_track_event.

Bug: 303199244
Test: atest libtracing_perfetto_tests
Flag: android.os.flags.perfetto_sdk_tracing
Change-Id: Idf7cfc7c7f9c8ac4191cabff3d958926606f564b
diff --git a/libs/tracing_perfetto/Android.bp b/libs/tracing_perfetto/Android.bp
index 3a4c869..b5c56c5 100644
--- a/libs/tracing_perfetto/Android.bp
+++ b/libs/tracing_perfetto/Android.bp
@@ -40,6 +40,7 @@
     ],
 
     shared_libs: [
+        "libbase",
         "libcutils",
         "libperfetto_c",
         "android.os.flags-aconfig-cc-host",