@@ -80,7 +80,7 @@ TEST(ProfiledThreadParkStateTest, SecondParkEnterOverwritesTicks) {
8080}
8181
8282TEST (ProfiledThreadMonitorStateTest, MonitorFlagLifecycle) {
83- ProfiledThread * thread = ProfiledThread::forTid (12348 );
83+ TestProfiledThread thread = testThread (12348 );
8484
8585 u64 start_ticks = 0 ;
8686 Context monitor_context = {};
@@ -98,11 +98,10 @@ TEST(ProfiledThreadMonitorStateTest, MonitorFlagLifecycle) {
9898
9999 EXPECT_FALSE (thread->monitorExit (OSThreadState::MONITOR_WAIT , start_ticks,
100100 monitor_context, blocker));
101- ProfiledThread::deleteForTest (thread);
102101}
103102
104103TEST (ProfiledThreadMonitorStateTest, ObjectWaitOwnsNestedMonitorContention) {
105- ProfiledThread * thread = ProfiledThread::forTid (12349 );
104+ TestProfiledThread thread = testThread (12349 );
106105
107106 EXPECT_TRUE (thread->monitorEnter (100 , 11 , OSThreadState::OBJECT_WAIT ));
108107
@@ -121,7 +120,6 @@ TEST(ProfiledThreadMonitorStateTest, ObjectWaitOwnsNestedMonitorContention) {
121120 monitor_context, blocker));
122121 EXPECT_EQ (100ULL , start_ticks);
123122 EXPECT_EQ (11ULL , blocker);
124- ProfiledThread::deleteForTest (thread);
125123}
126124
127125TEST (WallClockOncePerRunFilterTest, SlotStateTransitions) {
0 commit comments