Lines Matching defs:tier

63   // the function's baseline is reached and top tier compilation starts in
68 // Compiles baseline ahead of execution and starts top tier compilation in
72 // difference that top tier compilation is started eagerly.
74 // execution, but only in its early phase (until top tier compilation
175 // As long as any lower-tier units are outstanding we need to steal them
176 // before executing own higher-tier units.
178 for (int tier = GetLowestTierWithUnits(); tier <= max_tier; ++tier) {
179 if (auto unit = GetNextUnitOfTier(queue, tier)) {
181 num_units_[tier].fetch_sub(1, std::memory_order_relaxed);
212 int tier = pair.first;
215 num_units_[tier].fetch_add(units.size(), std::memory_order_relaxed);
219 queue->units[tier].push_back(unit);
224 big_units_queue_.has_units[tier].store(true,
226 big_units_queue_.units[tier].emplace(func_size, unit);
265 // Store tier in int so we can easily loop over it:
336 for (int tier = 0; tier < kNumTiers; ++tier) {
337 if (num_units_[tier].load(std::memory_order_relaxed) > 0) return tier;
343 int tier) {
347 if (tier == kTopTier) {
353 // Then check whether there is a big unit of that tier.
354 if (auto unit = GetBigUnitOfTier(tier)) return unit;
356 // Finally check whether our own queue has a unit of the wanted tier. If
361 if (!queue->units[tier].empty()) {
362 auto unit = queue->units[tier].back();
363 queue->units[tier].pop_back();
378 if (auto unit = StealUnitsAndGetFirst(queue, steal_task_id, tier)) {
384 // If we reach here, we didn't find any unit of the requested tier.
388 base::Optional<WasmCompilationUnit> GetBigUnitOfTier(int tier) {
390 if (!big_units_queue_.has_units[tier].load(std::memory_order_relaxed)) {
394 if (big_units_queue_.units[tier].empty()) return {};
395 WasmCompilationUnit unit = big_units_queue_.units[tier].top().unit;
396 big_units_queue_.units[tier].pop();
397 if (big_units_queue_.units[tier].empty()) {
398 big_units_queue_.has_units[tier].store(false, std::memory_order_relaxed);
551 // baseline and top tier compilation. Must be set before
557 // for recompilation (e.g. for tier down) to work later.
757 // The amount of generated top tier code since the last
980 // Correct top tier if necessary.
1005 // Compile everything for non-debugging initially. If needed, we will tier
1019 void AddBaselineUnit(int func_index, ExecutionTier tier) {
1020 baseline_units_.emplace_back(func_index, tier, kNoDebugging);
1023 void AddTopTierUnit(int func_index, ExecutionTier tier) {
1024 tiering_units_.emplace_back(func_index, tier, kNoDebugging);
1032 void AddRecompilationUnit(int func_index, ExecutionTier tier) {
1035 func_index, tier,
1036 tier == ExecutionTier::kLiftoff ? kForDebugging : kNoDebugging);
1476 ExecutionTier tier = unit.tier();
1477 if (tier == ExecutionTier::kLiftoff) {
1480 if (tier == ExecutionTier::kTurbofan) {
1543 ExecutionTier current_tier = unit->tier();
1546 while (unit->tier() == current_tier) {
1591 // Also publish each time the compilation tier changes from Liftoff to
1594 bool liftoff_finished = unit->tier() != current_tier &&
1595 unit->tier() == ExecutionTier::kTurbofan;
1743 // Reset {start_time_} to measure tier-up time.
2247 // compiling via streaming is tricky, we just tier down now, before publishing
2687 // Also, set a callback to sample the code size after top-tier compilation
3086 // Count functions to complete baseline and top tier compilation.
3141 // Trigger callbacks if module needs no baseline or top tier compilation. This
3319 // compilation. This is to avoid recompiling for the same tier or for
3339 // code (or code compiled for the wrong tier).
3348 // streaming compilation, there is a special path to tier down later, when
3532 DCHECK_EQ(code->tier(), ExecutionTier::kTurbofan);
3536 DCHECK_NE(code->tier(), ExecutionTier::kNone);
3551 // Check whether required baseline or top tier are reached.
3553 required_baseline_tier <= code->tier()) {
3557 if (code->tier() == ExecutionTier::kTurbofan) {
3561 required_top_tier <= code->tier()) {
3569 // the {for_debugging} flag. The tier can be Liftoff or TurboFan and is
3574 : code->tier() == ExecutionTier::kTurbofan;
3586 if (code->tier() > reached_tier) {
3588 compilation_progress_[slot_index], code->tier());
3833 // Everything except for top-tier units will be processed with kBaselineOnly