[M120 Migration] Set IO|GPU thread type with higher priorites
[platform/framework/web/chromium-efl.git] / gin / v8_shared_memory_dump_provider.h
1 // Copyright 2019 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GIN_V8_SHARED_MEMORY_DUMP_PROVIDER_H_
6 #define GIN_V8_SHARED_MEMORY_DUMP_PROVIDER_H_
7
8 #include "base/trace_event/memory_dump_provider.h"
9 #include "gin/gin_export.h"
10
11 namespace gin {
12
13 // Memory dump provider for the chrome://tracing infrastructure. It dumps
14 // summarized memory stats about V8 Memory shared between Isolates in the same
15 // process.
16 class GIN_EXPORT V8SharedMemoryDumpProvider
17     : public base::trace_event::MemoryDumpProvider {
18  public:
19   V8SharedMemoryDumpProvider();
20   V8SharedMemoryDumpProvider(const V8SharedMemoryDumpProvider&) = delete;
21   V8SharedMemoryDumpProvider& operator=(const V8SharedMemoryDumpProvider&) =
22       delete;
23
24   // MemoryDumpProvider implementation.
25   bool OnMemoryDump(
26       const base::trace_event::MemoryDumpArgs& args,
27       base::trace_event::ProcessMemoryDump* process_memory_dump) override;
28
29   static void Register();
30 };
31
32 }  // namespace gin
33
34 #endif  // GIN_V8_SHARED_MEMORY_DUMP_PROVIDER_H_