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

Unified Diff: src/compiler.h

Issue 2577263002: [Compiler] Track Ignition background compilation separately in RuntimeStats. (Closed)
Patch Set: Created 4 years 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/interpreter/interpreter.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 03c6f8199fe105e0cec8480db71f79fd6cf4143a..fb0dbd73d18b623ea2250cc8f1095201a3d6880d 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -162,7 +162,8 @@ class CompilationJob {
: info_(info),
compiler_name_(compiler_name),
state_(initial_state),
- stack_limit_(isolate->stack_guard()->real_climit()) {}
+ stack_limit_(isolate->stack_guard()->real_climit()),
+ executed_on_background_thread_(false) {}
virtual ~CompilationJob() {}
// Prepare the compile job. Must be called on the main thread.
@@ -191,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(can_execute_on_background_thread() ||
+ !executed_on_background_thread_);
Camillo Bruni 2016/12/16 09:25:05 DCHECK_IMPLIES(!can_execute_on_background_thread()
rmcilroy 2016/12/16 23:48:05 Done.
+ return executed_on_background_thread_;
+ }
State state() const { return state_; }
CompilationInfo* info() const { return info_; }
Isolate* isolate() const;
@@ -213,6 +219,7 @@ class CompilationJob {
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') | src/interpreter/interpreter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698