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

Unified Diff: src/compiler.h

Issue 2577263002: [Compiler] Track Ignition background compilation separately in RuntimeStats. (Closed)
Patch Set: Fix crash on accessing compilationinfo in constructor Created 3 years, 12 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') | no next file with comments »
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 e7110fe36a74185e830cfa3543fc28b0e47ff64f..4c008d2e23891cc30b16d43801bbdfc40147220f 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -163,11 +163,7 @@ class CompilationJob {
CompilationJob(Isolate* isolate, CompilationInfo* info,
const char* compiler_name,
- State initial_state = State::kReadyToPrepare)
- : info_(info),
- compiler_name_(compiler_name),
- state_(initial_state),
- stack_limit_(isolate->stack_guard()->real_climit()) {}
+ State initial_state = State::kReadyToPrepare);
virtual ~CompilationJob() {}
// Prepare the compile job. Must be called on the main thread.
@@ -196,6 +192,11 @@ class CompilationJob {
void set_stack_limit(uintptr_t stack_limit) { stack_limit_ = stack_limit; }
uintptr_t stack_limit() const { return stack_limit_; }
+ bool executed_on_background_thread() const {
+ DCHECK_IMPLIES(!can_execute_on_background_thread(),
+ !executed_on_background_thread_);
+ return executed_on_background_thread_;
+ }
State state() const { return state_; }
CompilationInfo* info() const { return info_; }
Isolate* isolate() const;
@@ -212,12 +213,14 @@ class CompilationJob {
private:
CompilationInfo* info_;
+ ThreadId isolate_thread_id_;
base::TimeDelta time_taken_to_prepare_;
base::TimeDelta time_taken_to_execute_;
base::TimeDelta time_taken_to_finalize_;
const char* compiler_name_;
State state_;
uintptr_t stack_limit_;
+ bool executed_on_background_thread_;
MUST_USE_RESULT Status UpdateState(Status status, State next_state) {
if (status == SUCCEEDED) {
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698