Shared library track event: API/ABI to emit data

This commit implements:
* New ABIs to emit events to the data source:
  * A low level ABI that allows users to do their own message
    serialization.
  * A high level ABI that accepts a representation of the data to be
    traced and performs serialization in the library.
* The PERFETTO_TE macro (similar to the TRACE_EVENT macro) that can be
  used to emit trace events using the high level ABI.

Bug: 237053982
Change-Id: I0ca1a9b03dfa67f7618e27e176f3113eddca871a
diff --git a/src/shared_lib/thread_utils.cc b/src/shared_lib/thread_utils.cc
new file mode 100644
index 0000000..372b832
--- /dev/null
+++ b/src/shared_lib/thread_utils.cc
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "perfetto/public/abi/thread_utils_abi.h"
+
+#include "perfetto/base/thread_utils.h"
+
+PerfettoThreadId PerfettoGetThreadIdImpl(void) {
+  return perfetto::base::GetThreadId();
+}