Commit Graph

43 Commits

Author SHA1 Message Date
Ryan Macnak daddec8308 Mark optimized code for the crash handler and disassembler output.
Optimized code has its function name prefixed with an asterisk, which is also how we display optimized code in Observatory.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2803013004 .
2017-04-07 13:31:51 -07:00
Erik Corry 1f1854aa78 Fix disassembly of OSR functions.
This got broken when I changed the compiler to not install OSR code on the
function, where it had to be immediately uninstalled again.

R=vegorov@google.com
BUG=

Review-Url: https://codereview.chromium.org/2793943002 .
2017-04-03 17:29:36 +02:00
Ryan Macnak b15b98bcc3 Reapply "Use CodeSourceMap for stack traces (still JIT only)."
- Fix missing null termination in initialization of ZoneTextBuffer.
 - Merge with John's async stack trace changes.

R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2686813006 .
2017-02-09 18:03:41 -08:00
Ryan Macnak 15a9eafb77 Revert "Reapply "Use CodeSourceMap for stack traces (still JIT only).""
This reverts commit bee82fef8b.

Revert "Use zone memory for StackTrace::ToCString."

This reverts commit 4e8b265ea0.

The later CL somehow caused hangs in some service tests.

Review-Url: https://codereview.chromium.org/2683033007 .
2017-02-09 13:14:01 -08:00
Ryan Macnak bee82fef8b Reapply "Use CodeSourceMap for stack traces (still JIT only)."
Include CodeSourceMaps in app-jit snapshots.

R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2686623006 .
2017-02-08 16:43:47 -08:00
Ryan Macnak 9e3bd0ef0a Revert "Use CodeSourceMap for stack traces (still JIT only)."
Failed with app-jit snapshots.

This reverts commit 7d2e6b1615.

Review-Url: https://codereview.chromium.org/2685723004 .
2017-02-08 13:33:23 -08:00
Ryan Macnak 7d2e6b1615 Use CodeSourceMap for stack traces (still JIT only).
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2684763002 .
2017-02-08 11:31:46 -08:00
Ryan Macnak 909ce02b12 Encode inlining information in CodeSourceMap and remove inlining interval arrays.
CodeSourceMap now contains a small bytecode that describes changes to the token position and inlining stack as one moves through a function. This information is used by the disassembler to display inlining comments and by the profiler to properly blame ticks against source code.

Slightly shrinks the total size of code metadata; on dart2js compiling hello world, the final heap is

 before 59.6MB total, 12.8MB List, 1.1MB CodeSourceMap
  after 59.4MB total, 12.1MB List, 1.5MB CodeSourceMap

To be filtered and included in AOT code to expand inline frames in stack traces.

R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2670843006 .
2017-02-07 12:52:21 -08:00
John McCutchan f125cc7d0b Improve the casing of Stackmap and Stacktrace.
- [x] Stackmap -> StackMap
- [x] Stacktrace -> StackTrace

This makes us consistent with the Dart language (StackTrace) and
corrects the casing of StackMap.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2572563004 .
2016-12-12 14:51:30 -08:00
Zachary Anderson a1bcf051d8 clang-format runtime/vm
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Florian Schneider add88f4ee3 Fix too strict debug assertion in disassembler.
When printing function objects to JSON, we still allocate
temporary strings on the Dart heap.

BUG=

Review URL: https://codereview.chromium.org/2372973003 .
2016-09-27 14:19:35 -07:00
Florian Schneider 4bd534191a VM: Avoid allocating strings when disassembling code.
For code objects, don't allocate symbol strings when printing the disassembly.

Don't try to make disassembling work with background compilation -- instead make sure that we don't allocate on the Dart heap while disassembling.

Add NoSafepointScope around disassemble functions to assert that no allocation happens.

Also, remove some dead code from object.cc.

BUG=#27430
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2363413004 .
2016-09-27 12:43:05 -07:00
Ryan Macnak 7ff2dd4117 Optimize AOT's switchable calls for the monomorphic case.
The call sequence is very similar to a classic IC call, except the guarded class and the target are loaded indirectly from the constant pool instead of as immediates. In the monomorphic case, we call directly to the expected target with a class check in the callee. In the unlinked, polymorphic and megamorphic cases, we call a stub; these case are now call-through instead of call-and-return.

Every code, except stubs involved in switchable calls, includes the class check sequence at the beginning. So we now distinguish between a checked and an unchecked entry point. Generated code except the switchable call continues to use the unchecked entry point.

PC offsets are calculated relative to the beginning of the instruction stream, rather than either entry point.

BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2226893002 .
2016-08-12 11:18:35 -07:00
Ryan Macnak 883f25ff08 Use the Code's pointer offsets to find object references when disassembling IA32.
Attempt to de-flake language/disassemble_test by removing a heap walk.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2160343003 .
2016-07-19 17:25:36 -07:00
Florian Schneider cbc1d9fc63 Don't print variable descriptors by default when printing disassembly.
Since variable descriptors are generated lazily, printing disassembly
could trigger re-parsing. This should not hurt in general, but running with
--disassemble should not invoke the parser just for printing -- hereby triggering GC or otherwise altering the execution in unexpected ways.

BUG=#26441
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2133443002 .
2016-07-08 10:12:24 -07:00
Zachary Anderson db26281172 DBC: CheckClassInstr
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2098573004 .
2016-06-29 15:25:43 -07:00
Srdjan Mitrovic 40d8eee81e Remove unnecessary isolate argument from some visitors
BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org/1838373002 .
2016-03-29 14:47:51 -07:00
Ryan Macnak 10f5ae69e8 ObjectPool is also used on IA32 for deopt.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1764283002 .
2016-03-04 12:33:33 -08:00
Ryan Macnak a78ed1c47a Tree-shake consts.
BUG=http://dartbug.com/25892
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1758153002 .
2016-03-04 09:42:53 -08:00
John McCutchan e2e7af1229 Remove more feature in product mode
- Remove Timeline.
- Remove more vmservice code.
- Remove AST printing.
- Remove IL printing.
- Remove profiler.
- Remove thread interrupter.
- Remove disassembler.
- Remove Library::CheckFunctionFingerprints.

- Update test status files for product mode.

Size of dart_bootstrap before: 5287631
Size of dart_bootstrap after: 5112783

Reduction in size: 174848 bytes.

Total reduction in size (382734 + 174848): 557582 bytes.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1678203002 .
2016-02-09 08:45:32 -08:00
Florian Schneider 117c7b0d3e Initial split of precompilation code from compiler.cc
This removes precompiler code from the regular JIT-mode VM, and allows us to add
more precompilation-specific optimizations without affecting the JIT compiler.

Remove JIT-related code from precompiler pipeline:
No type feedback, no OSR, no deopt, no block reordering, no background compilation

With precompilation, use precompiler pipeline for static initializers and const expressions as well.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1663163003 .
2016-02-09 11:29:13 +01:00
John McCutchan d295b9c311 Remove many features when building product mode
Move all JSON printing code from object.cc to object_service.cc.

Not compiled in:

- Service protocol
- Debugger
- Debugger API
- JSONStream
- ObjectIdRing
- Profiler service
- Object JSON printing

Size of dart_bootstrap before: 5670365 bytes
Size of dart_bootstrap after: 5287631 bytes

Reduction in size: 382734 bytes.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1660063002 .
2016-02-05 09:55:51 -08:00
Ryan Macnak df64bb1619 - Annotate instructions that load objects from the ObjectPool or Thread.
- Remove disassembly tooltips.
- Surface whether a function has an intrinsic or is recognized.
- Mark intrinsified or ffi functions in the profile.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1439893002 .
2015-11-12 15:18:31 -08:00
Florian Schneider 18faa55764 Fix lazy deoptimization from deferred code.
Insert enough padding to ensure enough space for when lazy deoptimization occurs
from the last deferred code object.

Also, speed up ia32 disassembler to avoid tests timing out.

BUG=

TBR=rmacnak@google.com,

Review URL: https://codereview.chromium.org//1355953002 .
2015-09-19 18:00:36 +02:00
Daniel Andersson a1bc527306 Migrate logging infrastructure Isolate->Thread
This enables thread-safe logging (e.g., ISL_Print, which will soon be renamed to THR_Print), which is needed for concurrent
marking (DetachCode) and compilation.

Make finalization of GC marking tasks concurrent, now that it's thread-safe.

BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org//1314673008 .
2015-09-09 15:30:38 -07:00
Todd Turnidge cc981c8246 Don't use %p when generating disassembly in vm service.
Evidentally it is platform dependent -- it seems to include the 0x
prefix on mac but not on windows.  I've switched to using %" Px "
instead.

This will fix bug 24038.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1282993002 .
2015-08-11 11:22:55 -07:00
koda@google.com e3a345a84b Rename NoGCScope -> NoSafepointScope.
The old name makes less sense in the context of concurrent GC (and multiple threads in general).

Document the intended semantics of this (DEBUG-only) guard scope.

R=asiva@google.com

Review URL: https://codereview.chromium.org//1016503005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44616 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-20 22:08:25 +00:00
johnmccutchan@google.com f2333f63a5 Add Function based profile tree
Profiler improvements:
- Track Functions in profile and build Function based trie
- Associate code objects with functions
- Created cpu_profile.dart library
- Major speed improvements for disassembly view
- Fix truncation of disassembly comments
- Ability to get code object ticks from disassembly view
- Inlining mini-map in disassembly view.
- Remove a bunch of unused data from profile service response
- In some cases a caller PC that is better than the PC marker is inserted into the stack trace
- Inlined functions are expanded
- Ability to clear profile
- New flag '--keep_code' which keeps deoptimized code around for use by the profiler.

General fixes:
- Fix caching in service library
- Remove pubspec.yaml before running pub get

R=asiva@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org//928833003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44067 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 18:48:55 +00:00
johnmccutchan@google.com 20efd2f0c4 Add Log::VPrint and remove duplicated code.
BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org//913603002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43624 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 23:28:47 +00:00
srdjan@google.com 81d8099650 Redesign inlining interval computation.
Review URL: https://codereview.chromium.org//904763003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43622 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 23:11:05 +00:00
johnmccutchan@google.com 23763129a5 Fix missing new lines in disassembly
BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org//908853005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43621 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 22:58:16 +00:00
johnmccutchan@google.com ddbefcab7e Fix disassembly comments
BUG=

Review URL: https://codereview.chromium.org//914463002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43610 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 20:57:41 +00:00
johnmccutchan@google.com 635ba4bbd9 Port flow_graph*, disassembler to ISL_Print
BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org//907093002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43609 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 20:49:32 +00:00
srdjan@google.com 4c8545557a Add inlining ranges/intervals to code objects so that we can map a pc to the inlined stack. The mapping is not fast, used only for disassembly.
Copied from other CL: https://codereview.chromium.org/790213004/

Review URL: https://codereview.chromium.org//817823002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42522 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 20:03:27 +00:00
johnmccutchan@google.com e9e54f6af6 Cleanup native, collected, and stub code handling in profiler
R=iposva@google.com, turnidge@google.com

Review URL: https://codereview.chromium.org//182703003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33177 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-28 22:55:53 +00:00
johnmccutchan@google.com d41a2106c2 Change Code object serialization format to use 50% less space.
Update observatory to support new format
Cache code objects inside observatory isolate
Profiler updates cache of code objects
Profiler can display annotated disassembly objects
Code objects now display sample ticks
Fix error viewer
Start using the logging package.

R=turnidge@google.com

Review URL: https://codereview.chromium.org//135843006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31931 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-17 21:16:44 +00:00
srdjan@google.com 09f44bdee7 Fix disassembler crash when mistaking integer values for objects.
R=iposva@google.com

Review URL: https://codereview.chromium.org//125263002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31576 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-07 21:12:37 +00:00
iposva@google.com 52a736ee38 - Disallow copy constructors.
Review URL: https://codereview.chromium.org//23903034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27346 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 17:47:55 +00:00
iposva@google.com 74b2a34d5b - Base JSON stream printing on stack objects.
- Simplify creation of a JSONStream.

- Add experimental coverage output to the VM.

R=asiva@google.com, johnmccutchan@google.com

Review URL: https://codereview.chromium.org//23875015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27344 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 17:21:59 +00:00
johnmccutchan@google.com 97ef50a1b2 Support stacktrace and objecthistogram service commands
R=asiva@google.com

Review URL: https://codereview.chromium.org//19870006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25726 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 00:24:09 +00:00
srdjan@google.com db0d864629 Add X64 assembler.
Review URL: https://chromiumcodereview.appspot.com//10826248

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10517 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 17:20:10 +00:00
regis@google.com d55fe56fcc Disassembler for x64.
Review URL: http://codereview.chromium.org//8758005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1953 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 23:12:46 +00:00
dgrove@google.com 4c0f559d23 Initial checkin.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00