| Index: runtime/vm/profiler_test.cc
|
| diff --git a/runtime/vm/profiler_test.cc b/runtime/vm/profiler_test.cc
|
| index bc43d5f576cd852a685678fa4ad6a378045cf857..12c21d1e95ad6cc928cced0b00a95443ddd5beff 100644
|
| --- a/runtime/vm/profiler_test.cc
|
| +++ b/runtime/vm/profiler_test.cc
|
| @@ -210,7 +210,7 @@ TEST_CASE(Profiler_TrivialRecordAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, class_a.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have 1 allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
| @@ -289,7 +289,7 @@ TEST_CASE(Profiler_ToggleRecordAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, class_a.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| }
|
| @@ -307,7 +307,7 @@ TEST_CASE(Profiler_ToggleRecordAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, class_a.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
| @@ -362,7 +362,7 @@ TEST_CASE(Profiler_ToggleRecordAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, class_a.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| }
|
| @@ -403,7 +403,7 @@ TEST_CASE(Profiler_CodeTicks) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, class_a.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| }
|
| @@ -426,7 +426,7 @@ TEST_CASE(Profiler_CodeTicks) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, class_a.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have three allocation samples.
|
| EXPECT_EQ(3, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
| @@ -498,7 +498,7 @@ TEST_CASE(Profiler_FunctionTicks) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, class_a.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| }
|
| @@ -521,7 +521,7 @@ TEST_CASE(Profiler_FunctionTicks) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, class_a.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have three allocation samples.
|
| EXPECT_EQ(3, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
| @@ -582,7 +582,7 @@ TEST_CASE(Profiler_IntrinsicAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, double_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| }
|
| @@ -596,7 +596,7 @@ TEST_CASE(Profiler_IntrinsicAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, double_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
| @@ -620,7 +620,7 @@ TEST_CASE(Profiler_IntrinsicAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, double_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| }
|
| @@ -650,7 +650,7 @@ TEST_CASE(Profiler_ArrayAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, array_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| }
|
| @@ -664,7 +664,7 @@ TEST_CASE(Profiler_ArrayAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, array_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
| @@ -688,7 +688,7 @@ TEST_CASE(Profiler_ArrayAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, array_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| }
|
| @@ -712,7 +712,7 @@ TEST_CASE(Profiler_ArrayAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, array_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
| @@ -757,7 +757,7 @@ TEST_CASE(Profiler_ContextAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, context_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| }
|
| @@ -771,7 +771,7 @@ TEST_CASE(Profiler_ContextAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, context_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
| @@ -791,7 +791,7 @@ TEST_CASE(Profiler_ContextAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, context_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| }
|
| @@ -835,7 +835,7 @@ TEST_CASE(Profiler_ClassAllocation) {
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, class_class.id());
|
| filter.set_enable_embedder_ticks(true);
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
| @@ -864,7 +864,7 @@ TEST_CASE(Profiler_ClassAllocation) {
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, class_class.id());
|
| filter.set_enable_embedder_ticks(true);
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| }
|
| @@ -897,7 +897,7 @@ TEST_CASE(Profiler_TypedArrayAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, float32_list_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| }
|
| @@ -911,7 +911,7 @@ TEST_CASE(Profiler_TypedArrayAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, float32_list_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
| @@ -937,7 +937,7 @@ TEST_CASE(Profiler_TypedArrayAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, float32_list_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| }
|
| @@ -951,7 +951,7 @@ TEST_CASE(Profiler_TypedArrayAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, float32_list_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should now have two allocation samples.
|
| EXPECT_EQ(2, profile.sample_count());
|
| }
|
| @@ -981,7 +981,7 @@ TEST_CASE(Profiler_StringAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, one_byte_string_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| }
|
| @@ -995,7 +995,7 @@ TEST_CASE(Profiler_StringAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, one_byte_string_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
| @@ -1017,7 +1017,7 @@ TEST_CASE(Profiler_StringAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, one_byte_string_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| }
|
| @@ -1031,7 +1031,7 @@ TEST_CASE(Profiler_StringAllocation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, one_byte_string_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should now have two allocation samples.
|
| EXPECT_EQ(2, profile.sample_count());
|
| }
|
| @@ -1061,7 +1061,7 @@ TEST_CASE(Profiler_StringInterpolation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, one_byte_string_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| }
|
| @@ -1075,7 +1075,7 @@ TEST_CASE(Profiler_StringInterpolation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, one_byte_string_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
| @@ -1101,7 +1101,7 @@ TEST_CASE(Profiler_StringInterpolation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, one_byte_string_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should still only have one allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| }
|
| @@ -1115,7 +1115,7 @@ TEST_CASE(Profiler_StringInterpolation) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, one_byte_string_class.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should now have two allocation samples.
|
| EXPECT_EQ(2, profile.sample_count());
|
| }
|
| @@ -1173,7 +1173,7 @@ TEST_CASE(Profiler_FunctionInline) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, class_a.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have no allocation samples.
|
| EXPECT_EQ(0, profile.sample_count());
|
| }
|
| @@ -1192,7 +1192,7 @@ TEST_CASE(Profiler_FunctionInline) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, class_a.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have 50,000 allocation samples.
|
| EXPECT_EQ(50000, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
| @@ -1294,7 +1294,8 @@ TEST_CASE(Profiler_FunctionInline) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, class_a.id());
|
| - profile.Build(&filter,
|
| + profile.Build(thread,
|
| + &filter,
|
| Profile::kNoTags,
|
| ProfilerService::kCodeTransitionTagsBit);
|
| // We should have 50,000 allocation samples.
|
| @@ -1426,7 +1427,7 @@ TEST_CASE(Profiler_ChainedSamples) {
|
| HANDLESCOPE(thread);
|
| Profile profile(isolate);
|
| AllocationFilter filter(isolate, class_a.id());
|
| - profile.Build(&filter, Profile::kNoTags);
|
| + profile.Build(thread, &filter, Profile::kNoTags);
|
| // We should have 1 allocation sample.
|
| EXPECT_EQ(1, profile.sample_count());
|
| ProfileTrieWalker walker(&profile);
|
|
|