class Platform
Defined at line 57 of file ../../third_party/perfetto/include/perfetto/tracing/platform.h
Public Methods
Platform * GetDefaultPlatform ()
Embedders can use this unless they have custom needs (e.g. Chrome wanting
to use its own base class for TLS).
void SetCurrentProcessId (base::PlatformProcessId process_id)
Embedders can call this to set process ID in those cases where getpid()
returns incorrect values (e.g. for sandboxed processes in Chromium).
Should only be called once, before tracing has been initialized.
Defined at line 66 of file ../../third_party/perfetto/include/perfetto/tracing/platform.h
base::PlatformProcessId GetCurrentProcessId ()
Returns process ID previously set by SetCurrentProcessId, or the process
ID provided by the OS if no custom ID was provided.
Defined at line 74 of file ../../third_party/perfetto/include/perfetto/tracing/platform.h
void ~Platform ()
ThreadLocalObject * GetOrCreateThreadLocalObject ()
std::unique_ptr<base::TaskRunner> CreateTaskRunner (const CreateTaskRunnerArgs & )
std::string GetCurrentProcessName ()
Used to derive the producer name. Mostly relevant when using the
kSystemBackend mode. It can be an arbitrary string when using the
in-process mode.
void Shutdown ()
Tear down any persistent platform state (e.g., TLS variables). The platform
interface must not be used after calling this function.
base::PlatformThreadId GetCurrentThreadId ()
Returns the thread ID provided by the OS by default. Chromium uses
different thread IDs on some platforms, so it needs the ability to
override this method.