perfetto: Use a global map to control the access of state change
subjects.

These subjects are used to managed by the callback, which is
assumed to only be triggered by perfetto thread. However,
iorap also calls this callback to handle too many perfetto tracing
instance. Add a global map to manage them to avoid use-after-free
bug.

Bug: 153627573
Change-Id: Id31b992438914b3b1cfba0cd693999897c3a52fe
1 file changed