Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: src/compiler.h

Issue 1013143003: CpuProfiler: push the collected information about deopts to cpu profiler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments addressed Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | src/compiler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index e58562664732af04b5fb4fa589440ec30b5482bc..61f75cd3cd3aef444b81f8a7577c577fbd370d8e 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -97,7 +97,7 @@ struct InlinedFunctionInfo {
SourcePosition inline_position;
int script_id;
int start_position;
- std::vector<int> deopt_pc_offsets;
+ std::vector<size_t> deopt_pc_offsets;
static const int kNoParentId = -1;
};
@@ -337,17 +337,19 @@ class CompilationInfo {
// to the current frame base. Used in CPU profiler to detect stack
// samples where top frame is not set up.
inline void AddNoFrameRange(int from, int to) {
- if (no_frame_ranges_) no_frame_ranges_->Add(OffsetRange(from, to));
+ if (!no_frame_ranges_.is_empty())
+ no_frame_ranges_->Add(OffsetRange(from, to));
}
List<OffsetRange>* ReleaseNoFrameRanges() {
- List<OffsetRange>* result = no_frame_ranges_;
- no_frame_ranges_ = NULL;
- return result;
+ return no_frame_ranges_.Detach();
}
int start_position_for(uint32_t inlining_id) {
- return inlined_function_infos_.at(inlining_id).start_position;
+ return inlined_function_infos_->at(inlining_id).start_position;
+ }
+ std::vector<InlinedFunctionInfo>* ReleaseInlinedFunctionInfos() {
+ return inlined_function_infos_.Detach();
Sven Panne 2015/03/23 10:13:27 This is horribly complicated: Can't we simply retu
}
void LogDeoptCallPosition(int pc_offset, int inlining_id);
@@ -459,8 +461,8 @@ class CompilationInfo {
int prologue_offset_;
- List<OffsetRange>* no_frame_ranges_;
- std::vector<InlinedFunctionInfo> inlined_function_infos_;
+ SmartPointer<List<OffsetRange>> no_frame_ranges_;
+ SmartPointer<std::vector<InlinedFunctionInfo>> inlined_function_infos_;
Sven Panne 2015/03/23 10:13:26 Following the KISS principle, leave the instance f
bool track_positions_;
// A copy of shared_info()->opt_count() to avoid handle deref
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | src/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698