Support arbitrary number of TRACE_EVENT arguments.

Refactor handling of TRACE_EVENT arguments to support passing an arbitrary
number of debug annotations, as well as passing debug annotations together
with a lambda.

This refactoring provides the basis for the future support of multiple
lambdas, as well as lambdaless filling of typed trace arguments.

The necessary logic is encapsulated in a separate file, which ensures
that the Chromium implementation of typed macros can reuse it without
waiting for the client library migration.

Bug: b/184558843
Change-Id: I1cd62b7a8b40a6916ba66834c7815cf045793064
diff --git a/tools/gen_android_bp b/tools/gen_android_bp
index 157f8f1..27b1eab 100755
--- a/tools/gen_android_bp
+++ b/tools/gen_android_bp
@@ -1025,6 +1025,8 @@
   gn = gn_utils.GnParser(desc)
   blueprint = create_blueprint_for_targets(gn, desc, args.targets or
                                            default_targets)
+  project_root = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
+  tool_name = os.path.relpath(os.path.abspath(__file__), project_root)
 
   # TODO(primiano): enable this on Android after the TODO in
   # perfetto_component.gni is fixed.
@@ -1048,7 +1050,7 @@
 // limitations under the License.
 //
 // This file is automatically generated by %s. Do not edit.
-""" % (__file__)
+""" % (tool_name)
   ]
   blueprint.to_string(output)
   with open(args.extras, 'r') as r: