#ifndef V8_PROFILER_SYMBOLIZER_H_
#define V8_PROFILER_SYMBOLIZER_H_
#include "src/base/macros.h"
#include "src/profiler/profile-generator.h"
namespace v8 {
namespace internal {
class CodeEntry;
class InstructionStreamMap;
class V8_EXPORT_PRIVATE Symbolizer {
public:
explicit Symbolizer(InstructionStreamMap* instruction_stream_map);
Symbolizer(const Symbolizer&) = delete;
Symbolizer& operator=(const Symbolizer&) = delete;
struct SymbolizedSample {
ProfileStackTrace stack_trace;
LineAndColumn src_pos;
};
SymbolizedSample SymbolizeTickSample(const TickSample& sample);
InstructionStreamMap* instruction_stream_map() { return code_map_; }
private:
CodeEntry* FindEntry(Address address,
Address* out_instruction_start = nullptr);
InstructionStreamMap* const code_map_;
};
}
}
#endif