Fix track event names with atrace via Perfetto

The perfettoTraceCounter method was broken because there was no
way to emit the equivalent of NamedTracks (non registered tracks)
for counters. This was fixed in aosp/3284918 with the introduction
of a more general API to create TrackDescriptors. Fixed the counter
track with this new method.

Additionally, a new atrace_name was added to the track descriptor
that doesn't guarantee the strings are fixed (for privacy reason).
Utilized the atrace_name for both slice and counter tracks instead
of the existing static_name.

Bug: 303199244
Test: Manual
Flag: android.os.perfetto_sdk_tracing
Change-Id: I376dc2f661bf1df4968a2983a1bb0f7dbb018f5c
1 file changed