summaryrefslogtreecommitdiff
path: root/deps/v8/src/profiler/profile-generator.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/profiler/profile-generator.h')
-rw-r--r--deps/v8/src/profiler/profile-generator.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/deps/v8/src/profiler/profile-generator.h b/deps/v8/src/profiler/profile-generator.h
index 3c976d6292..194b490929 100644
--- a/deps/v8/src/profiler/profile-generator.h
+++ b/deps/v8/src/profiler/profile-generator.h
@@ -99,7 +99,11 @@ class CodeEntry {
int GetSourceLine(int pc_offset) const;
+ void AddInlineStack(int pc_offset, std::vector<CodeEntry*>& inline_stack);
+ const std::vector<CodeEntry*>* GetInlineStack(int pc_offset) const;
+
Address instruction_start() const { return instruction_start_; }
+ Logger::LogEventsAndTags tag() const { return TagField::decode(bit_field_); }
static const char* const kEmptyNamePrefix;
static const char* const kEmptyResourceName;
@@ -109,7 +113,6 @@ class CodeEntry {
private:
class TagField : public BitField<Logger::LogEventsAndTags, 0, 8> {};
class BuiltinIdField : public BitField<Builtins::Name, 8, 8> {};
- Logger::LogEventsAndTags tag() const { return TagField::decode(bit_field_); }
uint32_t bit_field_;
const char* name_prefix_;
@@ -125,6 +128,8 @@ class CodeEntry {
size_t pc_offset_;
JITLineInfoTable* line_info_;
Address instruction_start_;
+ // Should be an unordered_map, but it doesn't currently work on Win & MacOS.
+ std::map<int, std::vector<CodeEntry*>> inline_locations_;
std::vector<InlinedFunctionInfo> inlined_function_infos_;
@@ -191,7 +196,7 @@ class ProfileTree {
~ProfileTree();
ProfileNode* AddPathFromEnd(
- const Vector<CodeEntry*>& path,
+ const std::vector<CodeEntry*>& path,
int src_line = v8::CpuProfileNode::kNoLineNumberInfo,
bool update_stats = true);
ProfileNode* root() const { return root_; }
@@ -225,7 +230,7 @@ class CpuProfile {
CpuProfile(Isolate* isolate, const char* title, bool record_samples);
// Add pc -> ... -> main() call path to the profile.
- void AddPath(base::TimeTicks timestamp, const Vector<CodeEntry*>& path,
+ void AddPath(base::TimeTicks timestamp, const std::vector<CodeEntry*>& path,
int src_line, bool update_stats);
void CalculateTotalTicksAndSamplingRate();
@@ -334,8 +339,8 @@ class CpuProfilesCollection {
// Called from profile generator thread.
void AddPathToCurrentProfiles(base::TimeTicks timestamp,
- const Vector<CodeEntry*>& path, int src_line,
- bool update_stats);
+ const std::vector<CodeEntry*>& path,
+ int src_line, bool update_stats);
// Limits the number of profiles that can be simultaneously collected.
static const int kMaxSimultaneousProfiles = 100;