• Home
  • Raw
  • Download

Lines Matching refs:job

24 bool DoNextStepOnMainThread(Isolate* isolate, CompilerDispatcherJob* job,  in DoNextStepOnMainThread()  argument
32 isolate->set_context(job->context()); in DoNextStepOnMainThread()
34 switch (job->status()) { in DoNextStepOnMainThread()
36 job->PrepareToParseOnMainThread(); in DoNextStepOnMainThread()
40 job->Parse(); in DoNextStepOnMainThread()
44 job->FinalizeParsingOnMainThread(); in DoNextStepOnMainThread()
48 job->AnalyzeOnMainThread(); in DoNextStepOnMainThread()
52 job->PrepareToCompileOnMainThread(); in DoNextStepOnMainThread()
56 job->Compile(); in DoNextStepOnMainThread()
60 job->FinalizeCompilingOnMainThread(); in DoNextStepOnMainThread()
68 DCHECK_EQ(job->status() == CompileJobStatus::kFailed, in DoNextStepOnMainThread()
70 if (job->status() == CompileJobStatus::kFailed && in DoNextStepOnMainThread()
74 return job->status() != CompileJobStatus::kFailed; in DoNextStepOnMainThread()
77 bool IsFinished(CompilerDispatcherJob* job) { in IsFinished() argument
78 return job->status() == CompileJobStatus::kDone || in IsFinished()
79 job->status() == CompileJobStatus::kFailed; in IsFinished()
82 bool CanRunOnAnyThread(CompilerDispatcherJob* job) { in CanRunOnAnyThread() argument
83 return job->status() == CompileJobStatus::kReadyToParse || in CanRunOnAnyThread()
84 job->status() == CompileJobStatus::kReadyToCompile; in CanRunOnAnyThread()
87 void DoNextStepOnBackgroundThread(CompilerDispatcherJob* job) { in DoNextStepOnBackgroundThread() argument
88 DCHECK(CanRunOnAnyThread(job)); in DoNextStepOnBackgroundThread()
92 switch (job->status()) { in DoNextStepOnBackgroundThread()
94 job->Parse(); in DoNextStepOnBackgroundThread()
98 job->Compile(); in DoNextStepOnBackgroundThread()
278 std::unique_ptr<CompilerDispatcherJob> job(new CompilerDispatcherJob( in Enqueue() local
282 jobs_.insert(std::make_pair(key, std::move(job))); in Enqueue()
298 JobMap::const_iterator job = GetJobFor(function); in EnqueueAndStep() local
299 DoNextStepOnMainThread(isolate_, job->second.get(), in EnqueueAndStep()
301 ConsiderJobForBackgroundProcessing(job->second.get()); in EnqueueAndStep()
321 std::unique_ptr<CompilerDispatcherJob> job(new CompilerDispatcherJob( in Enqueue() local
326 jobs_.insert(std::make_pair(key, std::move(job))); in Enqueue()
349 JobMap::const_iterator job = GetJobFor(function); in EnqueueAndStep() local
350 DoNextStepOnMainThread(isolate_, job->second.get(), in EnqueueAndStep()
352 ConsiderJobForBackgroundProcessing(job->second.get()); in EnqueueAndStep()
364 CompilerDispatcherJob* job) { in WaitForJobIfRunningOnBackground() argument
371 if (running_background_jobs_.find(job) == running_background_jobs_.end()) { in WaitForJobIfRunningOnBackground()
372 pending_background_jobs_.erase(job); in WaitForJobIfRunningOnBackground()
376 main_thread_blocking_on_job_ = job; in WaitForJobIfRunningOnBackground()
380 DCHECK(pending_background_jobs_.find(job) == pending_background_jobs_.end()); in WaitForJobIfRunningOnBackground()
381 DCHECK(running_background_jobs_.find(job) == running_background_jobs_.end()); in WaitForJobIfRunningOnBackground()
387 JobMap::const_iterator job = GetJobFor(function); in FinishNow() local
388 CHECK(job != jobs_.end()); in FinishNow()
396 WaitForJobIfRunningOnBackground(job->second.get()); in FinishNow()
397 while (!IsFinished(job->second.get())) { in FinishNow()
398 DoNextStepOnMainThread(isolate_, job->second.get(), in FinishNow()
401 bool result = job->second->status() != CompileJobStatus::kFailed; in FinishNow()
410 job->second->ResetOnMainThread(); in FinishNow()
411 jobs_.erase(job); in FinishNow()
463 auto job = it; in AbortInactiveJobs() local
467 if (running_background_jobs_.find(job->second.get()) != in AbortInactiveJobs()
474 job->second->ShortPrint(); in AbortInactiveJobs()
477 job->second->ResetOnMainThread(); in AbortInactiveJobs()
478 jobs_.erase(job); in AbortInactiveJobs()
523 for (auto job = range.first; job != range.second; ++job) { in GetJobFor() local
524 if (job->second->IsAssociatedWith(shared)) return job; in GetJobFor()
553 CompilerDispatcherJob* job) { in ConsiderJobForBackgroundProcessing() argument
554 if (!CanRunOnAnyThread(job)) return; in ConsiderJobForBackgroundProcessing()
557 pending_background_jobs_.insert(job); in ConsiderJobForBackgroundProcessing()
581 CompilerDispatcherJob* job = nullptr; in DoBackgroundWork() local
587 job = *it; in DoBackgroundWork()
589 running_background_jobs_.insert(job); in DoBackgroundWork()
592 if (job == nullptr) return; in DoBackgroundWork()
603 DoNextStepOnBackgroundThread(job); in DoBackgroundWork()
612 running_background_jobs_.erase(job); in DoBackgroundWork()
621 if (main_thread_blocking_on_job_ == job) { in DoBackgroundWork()
658 for (auto job = jobs_.begin(); in DoIdleWork() local
659 job != jobs_.end() && idle_time_in_seconds > 0.0; in DoIdleWork()
667 if (running_background_jobs_.find(job->second.get()) != in DoIdleWork()
669 ++job; in DoIdleWork()
672 auto it = pending_background_jobs_.find(job->second.get()); in DoIdleWork()
673 double estimate_in_ms = job->second->EstimateRuntimeOfNextStepInMs(); in DoIdleWork()
683 ConsiderJobForBackgroundProcessing(job->second.get()); in DoIdleWork()
685 ++job; in DoIdleWork()
686 } else if (IsFinished(job->second.get())) { in DoIdleWork()
690 job->second->ShortPrint(); in DoIdleWork()
691 PrintF(": %s\n", job->second->status() == CompileJobStatus::kDone in DoIdleWork()
696 job->second->ResetOnMainThread(); in DoIdleWork()
697 job = jobs_.erase(job); in DoIdleWork()
706 DoNextStepOnMainThread(isolate_, job->second.get(), in DoIdleWork()