Makes time spent in interpreted versus compiled Dart code visible in Observatory's pie chart. Will allow the profiler to know whether to start a stack walk from the machine code FP or the interpreter's FP.
Remove dead Dart 1 frontend tags. Add tag for loading bytecode.
Change-Id: I2c5a580e1581f8ccd5a93bb293899c81f900ef13
Reviewed-on: https://dart-review.googlesource.com/c/83564
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Like HOST_ARCH_*, HOST_OS_* describes the OS the VM is running on, which may be different from the OS the VM is generating code for during AOT compilation.
Currently we conflate the two when emitting AOT as assembly, and we get away with it because Flutter only uses assembly for targeting iOS and one can only target iOS from a Mac, but we expect to use assembly for Android as well so native tools can unwind Dart frames.
R=zra@google.com
Review-Url: https://codereview.chromium.org/2750843003 .
Kernel does not clear If-Then execution state bits when entering ARM signal handler which violates requirements imposed by ARM architecture reference. Some CPUs look at these bits even while in ARM mode which causes them
to skip some instructions in the prologue of the signal handler.
To work around the issue we insert enough NOPs in the prologue to ensure that no actual instructions are skipped and then branch to the actual signal handler.
For the kernel patch that fixes the issue see: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6ecf830e5029598732e04067e325d946097519cb
This causes sporadic crashes with SIGILL on some testing devices (e.g. Nexus 7).
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org/1940883002 .
fields in a thread (i.e fields that are not Dart VM related)
- Split the Thread structure to be a pure Dart per thread structure and add
a pointer to os_thread which points to the OSThread structure
- Change Schedule/UnSchedule to set the Dart Thread structure as the TLS of
the thread when it is inside the Dart world and reset the TLS back to the
OSThread strcuture when is exits the Dart World.
- Moved the stack_base and few stack size related functions to OSThread from Isolate
R=johnmccutchan@google.com, zra@google.com
Review URL: https://codereview.chromium.org/1439483003 .
- API breakage: Dart_IsolateBlocked, Dart_IsolateUnblocked -> Dart_ThreadDisableProfiling, Dart_ThreadEnableProfiling.
- Remove IsolateProfilerData.
- Move thread at blocking call count from isolate to thread.
- Always interrupt threads unless they are blocked.
- We can no longer count "idle" ticks.
- Only record sample if thread is the current mutator of an isolate.
- Refactor ThreadInterrupterCallback to ensure that Thread* is valid.
Threads are only ever sent signals if ThreadInterruptsEnabled is true. Which is controlled by two functions:
void DisableThreadInterrupts();
void EnableThreadInterrupts();
R=asiva@google.com, iposva@google.com
Review URL: https://codereview.chromium.org/1423473004 .
- API breakage: Dart_IsolateBlocked, Dart_IsolateUnblocked -> Dart_ThreadDisableProfiling, Dart_ThreadEnableProfiling.
- Remove IsolateProfilerData.
- Move thread at blocking call count from isolate to thread.
- Always interrupt threads unless they are blocked.
- We can no longer count "idle" ticks.
- Only record sample if thread is the current mutator of an isolate.
- Refactor ThreadInterrupterCallback to ensure that Thread* is valid.
Threads are only ever sent signals if ThreadInterruptsEnabled is true. Which is controlled by two functions:
void DisableThreadInterrupts();
void EnableThreadInterrupts();
R=asiva@google.com, iposva@google.com
Review URL: https://codereview.chromium.org/1412733008 .
- InterruptableThreadState is gone.
- Moved InterruptableThreadState fields directly into Thread.
- Iterate over all threads in an isolate when profiling.
- Still only sample the mutator thread.
Fix ThreadRegistry leak
- When deleting a Thread, iterate over all isolates and remove it from the isolate's thread registry.
R=iposva@google.com
Review URL: https://codereview.chromium.org//1293253005 .
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
On arm64, in Dart code, R18(SP) is the stack pointer.
In C++ code, R31(CSP) is the stack pointer.
The profiler must choose the right one when performing
its bounds checks.
This change also fixes a bug in the InvokeDartCode stub
on arm64 so that CSP is set to the Isolate's stack
limit immediately, rather than a bit later. When it was
set a bit later, if a profiler interrupt came in in the
interim, the stack would be smashed.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//583683002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40502 260f80e4-7a28-3924-810f-c04153c831b5