#include "src/diagnostics/basic-block-profiler.h"
#include <algorithm>
#include <numeric>
#include <sstream>
#include "src/base/lazy-instance.h"
#include "src/builtins/profile-data-reader.h"
#include "src/heap/heap-inl.h"
#include "src/objects/shared-function-info-inl.h"
namespace v8 {
namespace internal {
DEFINE_LAZY_LEAKY_OBJECT_GETTER(…)
DEFINE_LAZY_LEAKY_OBJECT_GETTER(…)
BasicBlockProfilerData::BasicBlockProfilerData(size_t n_blocks)
: … { … }
void BasicBlockProfilerData::SetCode(const std::ostringstream& os) { … }
void BasicBlockProfilerData::SetFunctionName(std::unique_ptr<char[]> name) { … }
void BasicBlockProfilerData::SetSchedule(const std::ostringstream& os) { … }
void BasicBlockProfilerData::SetBlockId(size_t offset, int32_t id) { … }
void BasicBlockProfilerData::SetHash(int hash) { … }
void BasicBlockProfilerData::ResetCounts() { … }
void BasicBlockProfilerData::AddBranch(int32_t true_block_id,
int32_t false_block_id) { … }
BasicBlockProfilerData* BasicBlockProfiler::NewData(size_t n_blocks) { … }
namespace {
Handle<String> CopyStringToJSHeap(const std::string& source, Isolate* isolate) { … }
constexpr int kBlockIdSlotSize = …;
constexpr int kBlockCountSlotSize = …;
}
BasicBlockProfilerData::BasicBlockProfilerData(
DirectHandle<OnHeapBasicBlockProfilerData> js_heap_data, Isolate* isolate) { … }
BasicBlockProfilerData::BasicBlockProfilerData(
Tagged<OnHeapBasicBlockProfilerData> js_heap_data) { … }
void BasicBlockProfilerData::CopyFromJSHeap(
Tagged<OnHeapBasicBlockProfilerData> js_heap_data) { … }
Handle<OnHeapBasicBlockProfilerData> BasicBlockProfilerData::CopyToJSHeap(
Isolate* isolate) { … }
void BasicBlockProfiler::ResetCounts(Isolate* isolate) { … }
bool BasicBlockProfiler::HasData(Isolate* isolate) { … }
void BasicBlockProfiler::Print(Isolate* isolate, std::ostream& os) { … }
void BasicBlockProfiler::Log(Isolate* isolate, std::ostream& os) { … }
std::vector<bool> BasicBlockProfiler::GetCoverageBitmap(Isolate* isolate) { … }
void BasicBlockProfilerData::Log(Isolate* isolate, std::ostream& os) { … }
std::ostream& operator<<(std::ostream& os, const BasicBlockProfilerData& d) { … }
BuiltinsCallGraph::BuiltinsCallGraph() : … { … }
void BuiltinsCallGraph::AddBuiltinCall(Builtin caller, Builtin callee,
int32_t block_id) { … }
const BuiltinCallees* BuiltinsCallGraph::GetBuiltinCallees(Builtin builtin) { … }
}
}