Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: runtime/vm/profiler_test.cc

Issue 2226893002: Optimize AOT's switchable calls for the monomorphic case. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/profiler_service.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/assert.h" 5 #include "platform/assert.h"
6 6
7 #include "vm/dart_api_impl.h" 7 #include "vm/dart_api_impl.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/profiler.h" 10 #include "vm/profiler.h"
(...skipping 2375 matching lines...) Expand 10 before | Expand all | Expand 10 after
2386 } 2386 }
2387 2387
2388 2388
2389 static uword FindPCForTokenPosition(const Code& code, 2389 static uword FindPCForTokenPosition(const Code& code,
2390 const CodeSourceMap& code_source_map, 2390 const CodeSourceMap& code_source_map,
2391 TokenPosition tp) { 2391 TokenPosition tp) {
2392 CodeSourceMap::Iterator it(code_source_map); 2392 CodeSourceMap::Iterator it(code_source_map);
2393 2393
2394 while (it.MoveNext()) { 2394 while (it.MoveNext()) {
2395 if (it.TokenPos() == tp) { 2395 if (it.TokenPos() == tp) {
2396 return it.PcOffset() + code.EntryPoint(); 2396 return it.PcOffset() + code.PayloadStart();
2397 } 2397 }
2398 } 2398 }
2399 2399
2400 return 0; 2400 return 0;
2401 } 2401 }
2402 2402
2403 2403
2404 TEST_CASE(Profiler_GetSourceReport) { 2404 TEST_CASE(Profiler_GetSourceReport) {
2405 const char* kScript = 2405 const char* kScript =
2406 "doWork(i) => i * i;\n" 2406 "doWork(i) => i * i;\n"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2554 EXPECT_SUBSTRING("\"positions\":[\"TempMove\",39]", js.ToCString()); 2554 EXPECT_SUBSTRING("\"positions\":[\"TempMove\",39]", js.ToCString());
2555 // Verify exclusive ticks in main. 2555 // Verify exclusive ticks in main.
2556 EXPECT_SUBSTRING("\"exclusiveTicks\":[1,0]", js.ToCString()); 2556 EXPECT_SUBSTRING("\"exclusiveTicks\":[1,0]", js.ToCString());
2557 // Verify inclusive ticks in main. 2557 // Verify inclusive ticks in main.
2558 EXPECT_SUBSTRING("\"inclusiveTicks\":[1,2]", js.ToCString()); 2558 EXPECT_SUBSTRING("\"inclusiveTicks\":[1,2]", js.ToCString());
2559 } 2559 }
2560 2560
2561 #endif // !PRODUCT 2561 #endif // !PRODUCT
2562 2562
2563 } // namespace dart 2563 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/profiler_service.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698