539 {
540 const bool kBypassSafepoint = false;
542 kBypassSafepoint);
543 {
544 MonitorLocker ml(monitor_);
545 ++*expected_count_;
546 }
548 for (
int i =
reinterpret_cast<intptr_t
>(thread);; ++
i) {
549 StackZone stack_zone(thread);
550 Zone* zone = thread->zone();
551 const intptr_t kUniqueSmi = 928327281;
553 if ((
i % 100) != 0) {
554
555 TransitionVMToBlocked transition(thread);
556 } else {
557
558 HeapIterationScope iteration(thread);
559 ASSERT(thread->OwnsSafepoint());
560 ObjectCounter counter(isolate_->
group(), &smi);
561 iteration.IterateStackPointers(&counter,
563 {
564 MonitorLocker ml(monitor_);
565 EXPECT_EQ(*expected_count_, counter.count());
566 }
570 EXPECT(label.Equals(
"foo"));
571 MonitorLocker ml(monitor_);
572 if (*expected_count_ ==
kTaskCount && !local_done_) {
573
574
575 local_done_ = true;
576 ++*total_done_;
577 }
578 }
579 }
580
581 {
582 MonitorLocker ml(monitor_);
584
585
586 --*expected_count_;
587 break;
588 }
589 }
590 }
592 {
593 MonitorLocker ml(monitor_);
594 ++*exited_;
595 ml.Notify();
596 }
597 }
UserTagPtr current_tag() const
UserTagPtr default_tag() const
IsolateGroup * group() const
static constexpr intptr_t kTaskCount
static SmiPtr New(intptr_t value)
static Thread * Current()
static void ExitIsolateGroupAsHelper(bool bypass_safepoint)
static bool EnterIsolateGroupAsHelper(IsolateGroup *isolate_group, TaskKind kind, bool bypass_safepoint)