diff options
Diffstat (limited to 'deps/v8/src/heap/heap-layout-tracer.h')
-rw-r--r-- | deps/v8/src/heap/heap-layout-tracer.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/deps/v8/src/heap/heap-layout-tracer.h b/deps/v8/src/heap/heap-layout-tracer.h new file mode 100644 index 0000000000..c7d677807e --- /dev/null +++ b/deps/v8/src/heap/heap-layout-tracer.h @@ -0,0 +1,33 @@ +// Copyright 2021 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef V8_HEAP_HEAP_LAYOUT_TRACER_H_ +#define V8_HEAP_HEAP_LAYOUT_TRACER_H_ + +#include "include/v8-callbacks.h" +#include "src/common/globals.h" + +namespace v8 { +namespace internal { + +class Heap; +class BasicMemoryChunk; + +class HeapLayoutTracer : AllStatic { + public: + static void GCProloguePrintHeapLayout(v8::Isolate* isolate, + v8::GCType gc_type, + v8::GCCallbackFlags flags, void* data); + static void GCEpiloguePrintHeapLayout(v8::Isolate* isolate, + v8::GCType gc_type, + v8::GCCallbackFlags flags, void* data); + + private: + static void PrintBasicMemoryChunk(std::ostream& os, BasicMemoryChunk* chunk, + const char* owner_name); + static void PrintHeapLayout(std::ostream& os, Heap* heap); +}; +} // namespace internal +} // namespace v8 +#endif // V8_HEAP_HEAP_LAYOUT_TRACER_H_ |