Remove string copies in Skia tracing macros
Remove string copies in Skia tracing macros

ATRACE_ANDROID_FRAMEWORK_ALWAYS and TRACE_EVENT0_ALWAYS create a
SkAndroidFrameworkTraceUtilAlways, which formats the input, requiring a
string copy. Mimic the split in SkAndroidFrameworkTraceUtil, which has
two constructors; one for formatting, and one for static strings. This
allows skipping the copy when it's unnecessary.

Make TRACE_EVENT0_ALWAYS call the cheaper constructor, since it never
has formatted input. ATRACE_ANDROID_FRAMEWORK_ALWAYS has few callers;
only one of them forces an unnecessary copy.

Bug: b/224677119
Test: perfetto
Change-Id: I8e699ae1496c94e08e6f7fce3616254b1a627a7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/539896
Commit-Queue: Leon Scroggins <995cad867ca30d6399abe011583a53547c8afea1@google.com>
Reviewed-by: Herb Derby <9e12a3d2bbf73546e47cc9958f6ba8f3215b7eaf@google.com>
Reviewed-by: Brian Osman <794c0b5534edf5601d88e1d41975d0262da12894@google.com>

google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,google/skia