#include "src/profiler/sampling-heap-profiler.h"
#include <stdint.h>
#include <memory>
#include "src/api/api-inl.h"
#include "src/base/ieee754.h"
#include "src/base/utils/random-number-generator.h"
#include "src/execution/frames-inl.h"
#include "src/execution/isolate.h"
#include "src/heap/heap.h"
#include "src/profiler/strings-storage.h"
namespace v8 {
namespace internal {
intptr_t SamplingHeapProfiler::Observer::GetNextSampleInterval(uint64_t rate) { … }
v8::AllocationProfile::Allocation SamplingHeapProfiler::ScaleSample(
size_t size, unsigned int count) const { … }
SamplingHeapProfiler::SamplingHeapProfiler(
Heap* heap, StringsStorage* names, uint64_t rate, int stack_depth,
v8::HeapProfiler::SamplingFlags flags)
: … { … }
SamplingHeapProfiler::~SamplingHeapProfiler() { … }
void SamplingHeapProfiler::SampleObject(Address soon_object, size_t size) { … }
void SamplingHeapProfiler::OnWeakCallback(
const WeakCallbackInfo<Sample>& data) { … }
SamplingHeapProfiler::AllocationNode* SamplingHeapProfiler::FindOrAddChildNode(
AllocationNode* parent, const char* name, int script_id,
int start_position) { … }
SamplingHeapProfiler::AllocationNode* SamplingHeapProfiler::AddStack() { … }
v8::AllocationProfile::Node* SamplingHeapProfiler::TranslateAllocationNode(
AllocationProfile* profile, SamplingHeapProfiler::AllocationNode* node,
const std::map<int, Handle<Script>>& scripts) { … }
v8::AllocationProfile* SamplingHeapProfiler::GetAllocationProfile() { … }
const std::vector<v8::AllocationProfile::Sample>
SamplingHeapProfiler::BuildSamples() const { … }
}
}