| Index: runtime/vm/profiler_test.cc
|
| diff --git a/runtime/vm/profiler_test.cc b/runtime/vm/profiler_test.cc
|
| index c953f21cfce0cc919a309279ccd0e46e1422811f..c431944674fd809961d0a55100ba1c41ebf4f5c8 100644
|
| --- a/runtime/vm/profiler_test.cc
|
| +++ b/runtime/vm/profiler_test.cc
|
| @@ -34,7 +34,6 @@ class DisableNativeProfileScope : public ValueObject {
|
| const bool FLAG_profile_vm_;
|
| };
|
|
|
| -
|
| class DisableBackgroundCompilationScope : public ValueObject {
|
| public:
|
| DisableBackgroundCompilationScope()
|
| @@ -50,7 +49,6 @@ class DisableBackgroundCompilationScope : public ValueObject {
|
| const bool FLAG_background_compilation_;
|
| };
|
|
|
| -
|
| // Temporarily adjust the maximum profile depth.
|
| class MaxProfileDepthScope : public ValueObject {
|
| public:
|
| @@ -65,7 +63,6 @@ class MaxProfileDepthScope : public ValueObject {
|
| const intptr_t FLAG_max_profile_depth_;
|
| };
|
|
|
| -
|
| class ProfileSampleBufferTestHelper {
|
| public:
|
| static intptr_t IterateCount(const Dart_Port port,
|
| @@ -81,7 +78,6 @@ class ProfileSampleBufferTestHelper {
|
| return c;
|
| }
|
|
|
| -
|
| static intptr_t IterateSumPC(const Dart_Port port,
|
| const SampleBuffer& sample_buffer) {
|
| intptr_t c = 0;
|
| @@ -96,7 +92,6 @@ class ProfileSampleBufferTestHelper {
|
| }
|
| };
|
|
|
| -
|
| TEST_CASE(Profiler_SampleBufferWrapTest) {
|
| SampleBuffer* sample_buffer = new SampleBuffer(3);
|
| Dart_Port i = 123;
|
| @@ -121,7 +116,6 @@ TEST_CASE(Profiler_SampleBufferWrapTest) {
|
| delete sample_buffer;
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_SampleBufferIterateTest) {
|
| SampleBuffer* sample_buffer = new SampleBuffer(3);
|
| Dart_Port i = 123;
|
| @@ -142,7 +136,6 @@ TEST_CASE(Profiler_SampleBufferIterateTest) {
|
| delete sample_buffer;
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_AllocationSampleTest) {
|
| Isolate* isolate = Isolate::Current();
|
| SampleBuffer* sample_buffer = new SampleBuffer(3);
|
| @@ -154,7 +147,6 @@ TEST_CASE(Profiler_AllocationSampleTest) {
|
| delete sample_buffer;
|
| }
|
|
|
| -
|
| static RawClass* GetClass(const Library& lib, const char* name) {
|
| const Class& cls = Class::Handle(lib.LookupClassAllowPrivate(
|
| String::Handle(Symbols::New(Thread::Current(), name))));
|
| @@ -162,7 +154,6 @@ static RawClass* GetClass(const Library& lib, const char* name) {
|
| return cls.raw();
|
| }
|
|
|
| -
|
| static RawFunction* GetFunction(const Library& lib, const char* name) {
|
| const Function& func = Function::Handle(lib.LookupFunctionAllowPrivate(
|
| String::Handle(Symbols::New(Thread::Current(), name))));
|
| @@ -170,7 +161,6 @@ static RawFunction* GetFunction(const Library& lib, const char* name) {
|
| return func.raw();
|
| }
|
|
|
| -
|
| class AllocationFilter : public SampleFilter {
|
| public:
|
| AllocationFilter(Dart_Port port,
|
| @@ -199,7 +189,6 @@ class AllocationFilter : public SampleFilter {
|
| bool enable_vm_ticks_;
|
| };
|
|
|
| -
|
| TEST_CASE(Profiler_TrivialRecordAllocation) {
|
| DisableNativeProfileScope dnps;
|
| const char* kScript =
|
| @@ -324,7 +313,6 @@ DART_NOINLINE static void NativeAllocationSampleHelper(char** result) {
|
| *result = static_cast<char*>(malloc(sizeof(char) * 1024));
|
| }
|
|
|
| -
|
| ISOLATE_UNIT_TEST_CASE(Profiler_NativeAllocation) {
|
| bool enable_malloc_hooks_saved = FLAG_profiler_native_memory;
|
| FLAG_profiler_native_memory = true;
|
| @@ -527,7 +515,6 @@ ISOLATE_UNIT_TEST_CASE(Profiler_NativeAllocation) {
|
| #endif // defined(DART_USE_TCMALLOC) && !defined(PRODUCT) &&
|
| // !defined(TARGET_ARCH_DBC) && !defined(HOST_OS_FUCHSIA)
|
|
|
| -
|
| TEST_CASE(Profiler_ToggleRecordAllocation) {
|
| DisableNativeProfileScope dnps;
|
| const char* kScript =
|
| @@ -555,7 +542,6 @@ TEST_CASE(Profiler_ToggleRecordAllocation) {
|
| Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
|
| EXPECT_VALID(result);
|
|
|
| -
|
| {
|
| Thread* thread = Thread::Current();
|
| Isolate* isolate = thread->isolate();
|
| @@ -658,7 +644,6 @@ TEST_CASE(Profiler_ToggleRecordAllocation) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_CodeTicks) {
|
| DisableNativeProfileScope dnps;
|
| const char* kScript =
|
| @@ -761,7 +746,6 @@ TEST_CASE(Profiler_CodeTicks) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_FunctionTicks) {
|
| DisableNativeProfileScope dnps;
|
| const char* kScript =
|
| @@ -864,7 +848,6 @@ TEST_CASE(Profiler_FunctionTicks) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_IntrinsicAllocation) {
|
| DisableNativeProfileScope dnps;
|
| const char* kScript = "double foo(double a, double b) => a + b;";
|
| @@ -936,7 +919,6 @@ TEST_CASE(Profiler_IntrinsicAllocation) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_ArrayAllocation) {
|
| DisableNativeProfileScope dnps;
|
| const char* kScript =
|
| @@ -1033,7 +1015,6 @@ TEST_CASE(Profiler_ArrayAllocation) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_ContextAllocation) {
|
| DisableNativeProfileScope dnps;
|
| const char* kScript =
|
| @@ -1103,7 +1084,6 @@ TEST_CASE(Profiler_ContextAllocation) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_ClosureAllocation) {
|
| DisableNativeProfileScope dnps;
|
| const char* kScript =
|
| @@ -1175,7 +1155,6 @@ TEST_CASE(Profiler_ClosureAllocation) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_TypedArrayAllocation) {
|
| DisableNativeProfileScope dnps;
|
| const char* kScript =
|
| @@ -1260,7 +1239,6 @@ TEST_CASE(Profiler_TypedArrayAllocation) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_StringAllocation) {
|
| DisableNativeProfileScope dnps;
|
| const char* kScript = "String foo(String a, String b) => a + b;";
|
| @@ -1346,7 +1324,6 @@ TEST_CASE(Profiler_StringAllocation) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_StringInterpolation) {
|
| DisableNativeProfileScope dnps;
|
| DisableBackgroundCompilationScope dbcs;
|
| @@ -1435,7 +1412,6 @@ TEST_CASE(Profiler_StringInterpolation) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_FunctionInline) {
|
| DisableNativeProfileScope dnps;
|
| DisableBackgroundCompilationScope dbcs;
|
| @@ -1720,7 +1696,6 @@ TEST_CASE(Profiler_FunctionInline) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_InliningIntervalBoundry) {
|
| // The PC of frames below the top frame is a call's return address,
|
| // which can belong to a different inlining interval than the call.
|
| @@ -1857,7 +1832,6 @@ TEST_CASE(Profiler_InliningIntervalBoundry) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_ChainedSamples) {
|
| MaxProfileDepthScope mpds(32);
|
| DisableNativeProfileScope dnps;
|
| @@ -1908,7 +1882,6 @@ TEST_CASE(Profiler_ChainedSamples) {
|
| Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
|
| EXPECT_VALID(result);
|
|
|
| -
|
| {
|
| Thread* thread = Thread::Current();
|
| Isolate* isolate = thread->isolate();
|
| @@ -1971,7 +1944,6 @@ TEST_CASE(Profiler_ChainedSamples) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_BasicSourcePosition) {
|
| DisableNativeProfileScope dnps;
|
| DisableBackgroundCompilationScope dbcs;
|
| @@ -2046,7 +2018,6 @@ TEST_CASE(Profiler_BasicSourcePosition) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_BasicSourcePositionOptimized) {
|
| DisableNativeProfileScope dnps;
|
| DisableBackgroundCompilationScope dbcs;
|
| @@ -2140,7 +2111,6 @@ TEST_CASE(Profiler_BasicSourcePositionOptimized) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_SourcePosition) {
|
| DisableNativeProfileScope dnps;
|
| DisableBackgroundCompilationScope dbcs;
|
| @@ -2245,7 +2215,6 @@ TEST_CASE(Profiler_SourcePosition) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_SourcePositionOptimized) {
|
| DisableNativeProfileScope dnps;
|
| DisableBackgroundCompilationScope dbcs;
|
| @@ -2370,7 +2339,6 @@ TEST_CASE(Profiler_SourcePositionOptimized) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_BinaryOperatorSourcePosition) {
|
| DisableNativeProfileScope dnps;
|
| DisableBackgroundCompilationScope dbcs;
|
| @@ -2484,7 +2452,6 @@ TEST_CASE(Profiler_BinaryOperatorSourcePosition) {
|
| }
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_BinaryOperatorSourcePositionOptimized) {
|
| DisableNativeProfileScope dnps;
|
| DisableBackgroundCompilationScope dbcs;
|
| @@ -2618,7 +2585,6 @@ TEST_CASE(Profiler_BinaryOperatorSourcePositionOptimized) {
|
| }
|
| }
|
|
|
| -
|
| static void InsertFakeSample(SampleBuffer* sample_buffer, uword* pc_offsets) {
|
| ASSERT(sample_buffer != NULL);
|
| Isolate* isolate = Isolate::Current();
|
| @@ -2644,9 +2610,7 @@ static void InsertFakeSample(SampleBuffer* sample_buffer, uword* pc_offsets) {
|
| sample->SetAt(i, 0);
|
| }
|
|
|
| -
|
| -static uword FindPCForTokenPosition(const Code& code,
|
| - TokenPosition tp) {
|
| +static uword FindPCForTokenPosition(const Code& code, TokenPosition tp) {
|
| GrowableArray<const Function*> functions;
|
| GrowableArray<TokenPosition> token_positions;
|
| for (intptr_t pc_offset = 0; pc_offset < code.Size(); pc_offset++) {
|
| @@ -2660,7 +2624,6 @@ static uword FindPCForTokenPosition(const Code& code,
|
| return 0;
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_GetSourceReport) {
|
| const char* kScript =
|
| "doWork(i) => i * i;\n"
|
| @@ -2794,7 +2757,6 @@ TEST_CASE(Profiler_GetSourceReport) {
|
| EXPECT_SUBSTRING("\"inclusiveTicks\":[1,2]", js.ToCString());
|
| }
|
|
|
| -
|
| TEST_CASE(Profiler_ProfileCodeTableTest) {
|
| Zone* Z = Thread::Current()->zone();
|
|
|
|
|