• Home
  • Raw
  • Download

Lines Matching full:profiling

18 #include "src/profiling/memory/heap_profile_internal.h"
39 #include "src/profiling/memory/client.h"
40 #include "src/profiling/memory/client_api_factory.h"
41 #include "src/profiling/memory/scoped_spinlock.h"
42 #include "src/profiling/memory/unhooked_allocator.h"
43 #include "src/profiling/memory/wire_protocol.h"
54 perfetto::profiling::Sampler sampler;
69 using perfetto::profiling::ScopedSpinlock;
70 using perfetto::profiling::UnhookedAllocator;
82 // Holds the active profiling client. Is empty at the start, or after we've
83 // started shutting down a profiling session. Hook invocations take shared_ptr
99 alignas(std::shared_ptr<perfetto::profiling::Client>) char g_client_arr[sizeof(
100 std::shared_ptr<perfetto::profiling::Client>)];
104 std::shared_ptr<perfetto::profiling::Client>* GetClientLocked() { in GetClientLocked()
106 new (g_client_arr) std::shared_ptr<perfetto::profiling::Client>; in GetClientLocked()
109 return reinterpret_cast<std::shared_ptr<perfetto::profiling::Client>*>( in GetClientLocked()
123 // perfetto::profiling::Sampler).
129 std::is_trivially_destructible<perfetto::profiling::Spinlock>::value,
131 perfetto::profiling::Spinlock g_client_lock{};
167 // Give up on profiling the process but leave it running. in OnSpinlockTimeout()
169 // subsequent profiling requests. The current session is kept in OnSpinlockTimeout()
175 perfetto::profiling::PoisonSpinlock(&g_client_lock); in OnSpinlockTimeout()
181 void ShutdownLazy(const std::shared_ptr<perfetto::profiling::Client>& client) { in ShutdownLazy()
198 perfetto::profiling::Client* client) { in MaybeToggleHeap()
243 // state (present only when actively profiling at the time of fork) in the
254 // * it should be possible to start a new profiling session in this child
275 // Leak the existing shared_ptr contents, including the profiling |Client| if in AtForkChild()
276 // profiling was active at the time of the fork. in AtForkChild()
280 new (g_client_arr) std::shared_ptr<perfetto::profiling::Client>(); in AtForkChild()
304 perfetto::profiling::StartHeapprofdIfStatic(); in AHeapInfo_create()
351 std::shared_ptr<perfetto::profiling::Client> client; in AHeapProfile_registerHeap()
384 std::shared_ptr<perfetto::profiling::Client> client; in AHeapProfile_reportAllocation()
435 std::shared_ptr<perfetto::profiling::Client> client; in AHeapProfile_reportSample()
468 std::shared_ptr<perfetto::profiling::Client> client; in AHeapProfile_reportFree()
505 std::shared_ptr<perfetto::profiling::Client> old_client; in AHeapProfile_initSession()
515 PERFETTO_LOG("%s: Rejecting concurrent profiling initialization.", in AHeapProfile_initSession()
527 UnhookedAllocator<perfetto::profiling::Client> unhooked_allocator(malloc_fn, in AHeapProfile_initSession()
532 std::shared_ptr<perfetto::profiling::Client> client = in AHeapProfile_initSession()
533 perfetto::profiling::ConstructClient(unhooked_allocator); in AHeapProfile_initSession()