Commit Graph

478 Commits

Author SHA1 Message Date
Ryan Macnak cc08f2ddd8 [vm] Don't enable the profiler by default. Enable the profiler at startup with --observe, or later through Observatory.
Note there is no option to disable the profiler. The profiler on Mac, Linux, and Android is based on SIGPROF, and there is no way to wait for all the outstanding signals as required to be able to safely free the sample buffer.

Saves ~20MB on 64-bit VMs.

R=cbernaschina@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2989093002 .
2017-08-01 17:57:08 -07:00
Zachary Anderson 8d6bc876f0 Reland "Remove fields from Isolate in Product mode"
In my reordering of the fields in Isolate, I omitted the initialization
of a few fields in the constroctor. This CL will reland the change with
the initialization added back.

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

Review-Url: https://codereview.chromium.org/2983403002 .
2017-07-25 13:24:30 -07:00
Zachary Anderson 211604d7a0 Revert "Remove fields from Isolate in Product mode"
This reverts commit 13558442ab.

The above change caused a timeout in a vm test:

FAILED: none-vm-checked release_x64 vm/cc/SafepointTestDart
Expected: Pass
Actual: Timeout
CommandOutput[run_vm_unittest]:
diagnostics: Process list including children: [28397]
    Trying to capture stack trace for pid 28397
    PID 28397 - process
    TID 28397:
    #0  0x00007efedf216404 pthread_cond_wait@@GLIBC_2.3.2
    #1  0x0000000002b9a315 dart::Monitor::WaitMicros(long)
    #2  0x0000000002af3496 dart::MonitorLocker::WaitWithSafepointCheck(dart::Thread*, long)
    #3  0x0000000002a8724d dart::Heap::AllocateOld(long, dart::HeapPage::PageType)
    #4  0x0000000002b07de3 dart::Object::Allocate(long, long, dart::Heap::Space)
    #5  0x0000000002b26eab dart::UnresolvedClass::New(dart::Object const&, dart::String const&, dart::TokenPosition)
    #6  0x0000000002be6358 dart::Parser::ParseType(dart::ClassFinalizer::FinalizationKind, bool, bool, dart::LibraryPrefix*)
    #7  0x0000000002ba9cc4 dart::Parser::ParseNewOperator(dart::Token::Kind)
    #8  0x0000000002bac7dc dart::Parser::ParsePrimary()
    #9  0x0000000002be19c1 dart::Parser::ParsePostfixExpr()
    #10 0x0000000002bdf1c4 dart::Parser::ParseUnaryExpr()
    #11 0x0000000002bb618c dart::Parser::ParseBinaryExpr(int)
    #12 0x0000000002bb869f dart::Parser::ParseConditionalExpr()
    #13 0x0000000002bae224 dart::Parser::ParseExpr(bool, bool)
    #14 0x0000000002bbeb79 dart::Parser::ParseAwaitableExpr(bool, bool, dart::SequenceNode**)
    #15 0x0000000002bd5273 dart::Parser::ParseStatement()
    #16 0x0000000002bbcce0 dart::Parser::ParseStatementSequence()
    #17 0x0000000002ba64e8 dart::Parser::ParseFunc(dart::Function const&, bool)
    #18 0x0000000002ba3e31 dart::Parser::ParseFunction(dart::ParsedFunction*)
    #19 0x00000000029e0725 dart::DartCompilationPipeline::ParseFunction(dart::ParsedFunction*)
    #20 0x00000000029e4898 dart::CompileFunctionHelper(dart::CompilationPipeline*, dart::Function const&, bool, long)
    #21 0x00000000029e5716 dart::Compiler::CompileOptimizedFunction(dart::Thread*, dart::Function const&, long)
    #22 0x0000000002c8d3a4 dart::DRT_StackOverflow(dart::NativeArguments)
    #23 0x00007efedf6ad61b
    TID 28421:
    #0  0x00007efedf2167be pthread_cond_timedwait@@GLIBC_2.3.2
    #1  0x0000000002b9a2ff dart::Monitor::WaitMicros(long)
    #2  0x0000000002cc6f8f dart::ThreadInterrupter::ThreadMain(unsigned long)
    #3  0x0000000002b999d9 dart::ThreadStart(void*)
    #4  0x00007efedf212184 start_thread
    #5  0x00007efede51737d __clone
    TID 28430:
    #0  0x00007efedf216404 pthread_cond_wait@@GLIBC_2.3.2
    #1  0x0000000002b9a315 dart::Monitor::WaitMicros(long)
    #2  0x0000000002af3496 dart::MonitorLocker::WaitWithSafepointCheck(dart::Thread*, long)
    #3  0x0000000002a8789e dart::HeapIterationScope::HeapIterationScope(bool)
    #4  0x0000000002ad4966 dart::Isolate::IterateObjectPointers(dart::ObjectPointerVisitor*, bool)
    #5  0x00000000027ed02a dart::SafepointTestTask::Run()
    #6  0x0000000002cc7cbd dart::ThreadPool::Worker::Loop()
    #7  0x0000000002cc7b6a dart::ThreadPool::Worker::Main(unsigned long)
    #8  0x0000000002b999d9 dart::ThreadStart(void*)
    #9  0x00007efedf212184 start_thread
    #10 0x00007efede51737d __clone
    TID 28431:
    #0  0x00007efedf216404 pthread_cond_wait@@GLIBC_2.3.2
    #1  0x0000000002b9a315 dart::Monitor::WaitMicros(long)
    #2  0x0000000002ad66fa dart::Isolate::ScheduleThread(bool, bool)
    #3  0x0000000002cc53ea dart::Thread::EnterIsolateAsHelper(dart::Isolate*, dart::Thread::TaskKind, bool)
    #4  0x0000000002a86317 dart::SweeperTask::Run()
    #5  0x0000000002cc7cbd dart::ThreadPool::Worker::Loop()
    #6  0x0000000002cc7b6a dart::ThreadPool::Worker::Main(unsigned long)
    #7  0x0000000002b999d9 dart::ThreadStart(void*)
    #8  0x00007efedf212184 start_thread
    #9  0x00007efede51737d __clone
    TID 28444:
    #0  0x00007efedf216404 pthread_cond_wait@@GLIBC_2.3.2
    #1  0x0000000002b9a315 dart::Monitor::WaitMicros(long)
    #2  0x0000000002af3496 dart::MonitorLocker::WaitWithSafepointCheck(dart::Thread*, long)
    #3  0x0000000002a8724d dart::Heap::AllocateOld(long, dart::HeapPage::PageType)
    #4  0x0000000002b07de3 dart::Object::Allocate(long, long, dart::Heap::Space)
    #5  0x0000000002b26eab dart::UnresolvedClass::New(dart::Object const&, dart::String const&, dart::TokenPosition)
    #6  0x0000000002be6358 dart::Parser::ParseType(dart::ClassFinalizer::FinalizationKind, bool, bool, dart::LibraryPrefix*)
    #7  0x0000000002bb19bb dart::Parser::ParseTypeOrFunctionType(bool, dart::ClassFinalizer::FinalizationKind)
    #8  0x0000000002bb204c dart::Parser::ParseFormalParameter(bool, bool, dart::ParamList*)
    #9  0x0000000002bb43b3 dart::Parser::ParseFormalParameters(bool, bool, bool, dart::ParamList*)
    #10 0x0000000002ba368b dart::Parser::ParseFormalParameterList(bool, bool, bool, dart::ParamList*)
    #11 0x0000000002ba5a8f dart::Parser::ParseFunc(dart::Function const&, bool)
    #12 0x0000000002ba3e31 dart::Parser::ParseFunction(dart::ParsedFunction*)
    #13 0x00000000029e0725 dart::DartCompilationPipeline::ParseFunction(dart::ParsedFunction*)
    #14 0x00000000029e4898 dart::CompileFunctionHelper(dart::CompilationPipeline*, dart::Function const&, bool, long)
    #15 0x00000000029e5716 dart::Compiler::CompileOptimizedFunction(dart::Thread*, dart::Function const&, long)
    #16 0x00000000029e7036 dart::BackgroundCompiler::Run()
    #17 0x0000000002cc7cbd dart::ThreadPool::Worker::Loop()
    #18 0x0000000002cc7b6a dart::ThreadPool::Worker::Main(unsigned long)
    #19 0x0000000002b999d9 dart::ThreadStart(void*)
    #20 0x00007efedf212184 start_thread
    #21 0x00007efede51737d __clone
Review-Url: https://codereview.chromium.org/2988703002 .
2017-07-24 14:17:53 -07:00
Zachary Anderson 13558442ab Remove fields from Isolate in Product mode
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2984883002 .
2017-07-24 13:22:44 -07:00
Zachary Anderson 5258cbec10 Fix Flutter engine build
Fixes an unused variable error in android_release.

Review-Url: https://codereview.chromium.org/2986463002 .
2017-07-19 09:55:51 -07:00
Zachary Anderson 62e3ceb460 Remove some pause-related fields in a PRODUCT build
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2979243002 .
2017-07-19 09:15:50 -07:00
Zachary Anderson 952345ff84 Remove the debugger_ field from Isolate in a PRODUCT build.
This is the first in a series of CL in which I am removing fields from
classes that aren't used in PRODUCT mode. This CL removes the
debugger_ field from Isolate.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2981173002 .
2017-07-18 13:29:40 -07:00
Diogenes Nunez 699f84f941 Moves the top_ and end_ words of the Scavenger into mutator thread.
This is the first step to adding Thread Local Allocation Buffers to
the VM.

In this step, the mutator alone allocates to the new space, but keeps
track of the start and end of the space. This is akin to a single large
TLAB.

As a result, the generated code and the dbc simulator changed how they
allocate objects into the new space as well.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2980033002 .
2017-07-13 13:46:17 -07:00
Zachary Anderson 6cd8a79078 VM: Re-format to use at most one newline between functions
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Diogenes Nunez c0d4e02693 Revert "Moves the top_ and end_ words of the Scavenger into mutator thread."
This reverts commit 710544a907.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2974403002 .
2017-07-12 14:30:06 -07:00
Diogenes Nunez 710544a907 Moves the top_ and end_ words of the Scavenger into mutator thread.
This is the first step to adding Thread Local Allocation Buffers to
the VM.

In this step, the mutator alone allocates to the new space, but keeps
track of the start and end of the space. This is akin to a single large
TLAB.
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2951333002 .
2017-07-12 14:09:07 -07:00
Zachary Anderson ac16656161 Remove MIPS support
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2858623002 .
2017-06-22 08:49:22 -07:00
Ryan Macnak 2109cc53bf Remember deopt-id -> context-level mappings in var descriptors.
- Add deopt ids to DebugStepInstr and StrictCompareInstr since the debugger can stop there.
 - Add missing pc descriptor in DBC's StringInterpolateInstr.

Re-enable async_debugger, which had been crashing flakily from context mismatches.

R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2903993002 .
2017-06-01 12:33:33 -07:00
Ryan Macnak 76df24b076 CoreJIT snapshots without training.
Only include OSR and field guards in the features descriptor for JIT code to avoid gen_snapshot and dart having different default values.

Disabled since core snapshots with code break tests with non-default flags for type checks, assertions, strict errors, OSR, or field guards.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2902313004 .
2017-05-31 13:49:12 -07:00
Erik Corry aa60a2ea90 More compact string representation on 64 bit.
This moves the hash code into the header word for strings on 64 bit
platforms.  With the old layout, 9 character strings became 48-byte
objects.  With the new layout you have to go to 17 characters before
you are bumped from 4 to 6 words (32 to 48 bytes).

As a side effect, the class ID field is now 16 bits on all platforms
instead of having two different sizes, and the size field is 8 bits
on all platforms.

This also paves the way for moving the hash code for instance objects
into the header, so we won't need the side-lookup in the
hash-table-of-hash-codes on 64 bit platforms.

This is a reapplication of https://codereview.chromium.org/2893553002/
after issues were fixed in https://codereview.chromium.org/2888413002/
and https://codereview.chromium.org/2896583002/

R=vegorov@google.com
BUG=

Review-Url: https://codereview.chromium.org/2895183002 .
2017-05-22 10:04:59 +02:00
Dmitry Stefantsov e5f93a068f Revert "More compact string representation on 64 bit."
This reverts commit 5c8e472c82.

TBR=erikcorry@google.com

Review-Url: https://codereview.chromium.org/2889723005 .
2017-05-18 14:23:12 +02:00
Erik Corry 5c8e472c82 More compact string representation on 64 bit.
This moves the hash code into the header word for strings on 64 bit
platforms.  With the old layout, 9 character strings became 48-byte
objects.  With the new layout you have to go to 17 characters before
you are bumped from 4 to 6 words (32 to 48 bytes).

As a side effect, the class ID field is now 16 bits on all platforms
instead of having two different sizes, and the size field is 8 bits
on all platforms.

This also paves the way for moving the hash code for instance objects
into the header, so we won't need the side-lookup in the
hash-table-of-hash-codes on 64 bit platforms.

R=vegorov@google.com
BUG=

Review-Url: https://codereview.chromium.org/2893553002 .
2017-05-18 11:54:40 +02:00
Ryan Macnak 7589236f45 Dwarf tools interpret line number table pc's as start boundries instead of end boundries.
Put kNoSourcePosition on line 0 instead of line 1.

Closes #28785

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

Review-Url: https://codereview.chromium.org/2762313003 .
2017-03-22 10:30:02 -07:00
Ryan Macnak 9f2668c998 Set TARGET_OS_* from GN, falling back to HOST_OS_*.
Use TARGET_OS_* instead of HOST_OS_* to decide on the assembly variant to use. Allows, say, a gen_snapshot compiled for a Mac to target Android when generating AOT as assembly.

R=fschneider@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2757783003 .
2017-03-20 14:48:28 -07:00
Ryan Macnak b09552cd62 Reapply "DWARF and unwind support for AOT assembly output."
This reverts commit 8fcdbb4a7f.

R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2761593002 .
2017-03-20 13:02:41 -07:00
Erik Ernst 8fcdbb4a7f Revert "DWARF and unwind support for AOT assembly output."
Gardening.

This reverts commit ca20aab384.

That commit causes generation of incorrect register names on
vm-noopt-simarm64-mac-be, and it seems to cause a disk full
error later on (making the bot purple).

Review-Url: https://codereview.chromium.org/2754233002 .
2017-03-17 12:57:45 +01:00
Ryan Macnak ca20aab384 DWARF and unwind support for AOT assembly output.
Emit CFI information to teach gdb how to unwind Dart frames. Fixes unwinding for Mac x64 and Linux x64/ARM/ARM64. Unwinding already worked for iOS ARM64. Fixes unwinding on Android 6+ ARM.

Emit DWARF information about function inlining and line number mappings. Works with gdb, addr2line and llvm-symbolizer.

With --dwarf-stack-traces, also remove CodeSourceMaps from snapshots and change stack traces to a non-compliant form resembling Android's debuggerd output, which can be passed to ndk-stack.

Issue #28785

R=fschneider@google.com, johnmccutchan@google.com, vegorov@google.com

Review-Url: https://codereview.chromium.org/2723213002 .
2017-03-16 13:08:54 -07:00
Vyacheslav Egorov 021f933f69 VM: Make use_osr an Isolate flag, similar to how we made use_field_guards.
In Debug mode we have assertions checking that we don't attempt OSR when
FLAG_use_osr is disabled - however app-jit snapshots are compiled with OSR
enabled and still contain countining and OSR attempting code, which causes
assertions to fail.

Refactor how getters for isolate flags are defined, consolidate all flags into
a single list.

Update test expectations and switch -c dartk configuration to use app-jit snapshot.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2728163002 .
2017-03-03 19:02:23 +01:00
Vyacheslav Egorov a9a756df8e VM: Allow configuring use_field_guards on the per-isolate basis and include it into snapshot features.
We have tests that disable it but we train app-jit snapshot for Kernel with field guards enabled so
we need to make sure that Kernel isolate runs with correct settings matching the settings at the time
when app-jit snapshot was created.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2715213008 .
2017-02-28 21:17:17 +01:00
Vyacheslav Egorov a5e1f89583 VM: Fix an app-jit related shutdown race.
IsolateData contains AppSnapshot which might own some HeapPage-s, so we can't
destroy IsolateData in the Dart_IsolateShutdownCallback, because some thread
running in the isolate (e.g. background compiler) might still touch
thoses pages or objects they host.

We need to delay destruction of AppSnapshot until after the isolate shutdown.

Current API does not allow that, so we introduce a new isolate lifecycle
callback - Dart_IsolateCleanupCallback, which is invoked at the end of the
isolote lifecycle when things like background compiler have been stopped
and no Dart code is supposed to run.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2720723005 .
2017-02-28 21:10:04 +01:00
Vyacheslav Egorov ff9c17504a VM: Make Dart::FeaturesString respect isolate flags controlling asserts and type checks.
Before it simply looked at FLAG_enable_{asserts/type_checks}.

We allow disabling or enabling type checks / asserts for newly created isolates
through Dart_IsolateFlags even when they are enabled globally through
FLAG_enable_{asserts/type_checks} flags.

This change allows isolates to use app-jit snapshots trained with type checks /
asserts disabled as long as isolate itself has type check and asserts disabled,
independent of whether FLAG_enable_{asserts/type_checks} is set globally or not.

Additionally disable type checks and asserts on Kernel isolate even if flags
FLAG_enable_{asserts/type_checks} are set.

This change allows to train Kernel app-jit snapshot once and use it both for

$ dart --dfe=...

and for

$ dart --checked --dfe=...

configurations.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2720123004 .
2017-02-28 21:05:29 +01:00
Ben Konyi 68a102cab2 Fixed tests not having MallocHooks initialized for tests in release mode.
Revert "Revert "Fixed issue in MallocHooks where a MallocHookScope was accidentally removed during a merge, causing a deadlock in the hooks. Also turned off stack trace collection in a test that was timing out as a result of the stack trace collection.""

This reverts commit 1a5b555aa9.

BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2711353003 .
2017-02-24 13:56:06 -08:00
Ben Konyi 1a5b555aa9 Revert "Fixed issue in MallocHooks where a MallocHookScope was accidentally removed during a merge, causing a deadlock in the hooks. Also turned off stack trace collection in a test that was timing out as a result of the stack trace collection."
This reverts commit 44a9a4ede3.

BUG=

Review-Url: https://codereview.chromium.org/2714083002 .
2017-02-23 19:21:00 -08:00
Ben Konyi 44a9a4ede3 Fixed issue in MallocHooks where a MallocHookScope was accidentally removed during a merge, causing a deadlock in the hooks. Also turned off stack trace collection in a test that was timing out as a result of the stack trace collection.
Updated MallocHooks to collect stack traces when memory is allocated.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2718523003 .
2017-02-23 18:58:50 -08:00
Ben Konyi d4f026c2e0 Revert "Updated MallocHooks to collect stack traces when memory is allocated."
This reverts commit a486a8a26b51dce728373183ab02aeda70e6f2d0.

R=johnmccutchan@google.com
TBR=johnmccutchan@google.com
BUG=

Review-Url: https://codereview.chromium.org/2713803003 .
2017-02-23 13:13:44 -08:00
Ben Konyi 47f0da9cd7 Updated MallocHooks to collect stack traces when memory is allocated.
BUG=
R=johnmccutchan@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2680213002 .
2017-02-23 12:42:18 -08:00
Matthias Hausner bd901a907f Fix build for precompiled target
TBR=jensj

BUG=

Review-Url: https://codereview.chromium.org/2695013002 .
2017-02-14 04:35:28 -08:00
Matthias Hausner 93901ae3be Don’t pause kernel isolate on start and exit
Exclude Kernel isolate from —pause-isolates-on-{start|exit}

BUG=
R=jensj@google.com

Review-Url: https://codereview.chromium.org/2689563010 .
2017-02-14 04:16:16 -08:00
John McCutchan a0ee5b24db Track async causal stack traces
This CL improves the stack traces that accompany exceptions. Whenever an
async function is entered, we remember how we got there. This is similar
in spirit to package:stack_trace but the implementation is more efficient
and memory usage can be more easily reasoned about.

Tracking causal stack traces:

- [x] Upon entry to an async function, capture the synchronous stack trace prefix and store it into the closure.
- [x] Upon entry to an async* function, capture the synchronous stack trace prefix and store it into the closure.
- [x] Before returning from an async function, clear the Thread's asynchronous stack trace.
- [x] After resuming an async function, load the sychronous stack trace prefix into the Thread.
- [x] Filter stack traces to remove async machinery.

Service protocol changes:

- [x] Send causal async stack trace.

Observatory changes:

- [x] Display causal async stack trace below async functions.

Fixes https://github.com/dart-lang/sdk/issues/27661

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

Comparisons: https://docs.google.com/a/google.com/document/d/10r6jEqr8OCiDZ4y9SYU_uOimcHiOGAZMly2ghTErALI/edit?usp=sharing
Review-Url: https://codereview.chromium.org/2646443005 .
2017-02-09 15:39:44 -08:00
Ben Konyi f679b3c3e5 Reintroducing MallocHooks changes with fix for hooks being called when in execvpe after a fork while the MallocHooks lock is held by a thread that may no longer exist.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2647283004 .
2017-01-30 09:55:20 -08:00
Ryan Macnak b46af1e75f Refactor snapshots pieces to include a section for loading instructions into the heap of a regular isolate.
Progress toward allowing each isolate to load a different snapshot.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2622053002 .
2017-01-23 10:25:02 -08:00
Zach Anderson 7730809f36 Revert "Reintroducing MallocHooks changes with fix for infinite loop in MallocHooks on Platform::Exit."
This reverts commit 7bf5d87017.

The lock introduced by this change in MallocHooksState is held across
a fork(), which causes deadlock in the child when execvpe() fails and
tries to acquire the lock when freeing memory.

Review-Url: https://codereview.chromium.org/2647793005 .
2017-01-20 23:52:31 -08:00
Ben Konyi 7bf5d87017 Reintroducing MallocHooks changes with fix for infinite loop in MallocHooks on Platform::Exit.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2643303003 .
2017-01-20 15:26:58 -08:00
Ben Konyi c9a4374ed9 Revert "Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project."
This reverts commit 5290052550.

Revert "Fixed segfault in Remove method."

This reverts commit 203f1ba222.

BUG=
TBR=zra@google.com

Review-Url: https://codereview.chromium.org/2647763003 .
2017-01-19 15:17:29 -08:00
Ben Konyi 5290052550 Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project.
Fixed build issues from original submission.

BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2623613003 .
Review-Url: https://codereview.chromium.org/2644903003 .
2017-01-19 13:15:56 -08:00
Ben Konyi 10686766cd Revert "Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project."
This reverts commit bcd7ba1056.

TBR=zra@google.com

BUG=

Review-Url: https://codereview.chromium.org/2645973002 .
2017-01-19 12:14:19 -08:00
Ben Konyi bcd7ba1056 Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2623613003 .
2017-01-19 12:09:07 -08:00
Siva Annamalai 793e4b89e6 1. Added new flag verify_gc_contains and moved all the asserts that do a
heap contains verification under it. This flag is turned on automatically
   when verify_before_gc, verify_after_gc or verify_on_transition is
   specified. This should speed up the debug builds on the bot.
   A dart2js build line for instance goes from 2357.526 seconds
   to 184.22 seconds

2. Verify heap on shutdown only under the flag verify_on_transition.

R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2626343002 .
2017-01-12 16:03:22 -08:00
Ryan Macnak 9c1702d38a Fix duplication of the megamorphic miss function when running a JIT app snapshot.
1a41627ecc caused isolate start up to incorrectly create a second megamorphic miss function when running from a JIT app snapshot. These caused the code for the one from the snapshot to be collected, and the parser to fail attempting to recompile it.

Fixes #28200

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2616763003 .
2017-01-05 15:34:03 -08:00
Ryan Macnak 1a41627ecc When creating a JIT app snapshot, don't recreate the VM isolate snapshot.
Prerequisite for using multiple isolate snapshots in the same process.

R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2583673002 .
2016-12-16 15:44:29 -08:00
Ryan Macnak e48f143006 Internally measure isolate uptime with monotonic time.
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2583663002 .
2016-12-15 14:34:04 -08:00
Ryan Macnak dc426c8c52 Rename snapshot kind enum values (kAppWithJIT -> kAppJIT, kAppNoJIT -> kAppAOT).
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2580823003 .
2016-12-15 12:16:02 -08:00
Matthias Hausner f5ab173c77 Add Kernel Isolate, second attempt
To run a script with the Dart->Kernel parser, use the -dfe option:

dart --dfe=runtime/tools/kernel-service.dart  --packages=/src/d2/sdk/.packages  foo.dart

The front end expects a directory named patched_sdk in the build directory (patched_sdk should be a sibling of the directory that contains the dart executable.)

Warning: using a debug build dart executable is very slow. It takes 2 minutes to run Hello World in a debug build, and about 7 seconds in a release build.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2558673002 .
2016-12-07 09:11:16 -08:00
Matthias Hausner 2ea399285a Revert "Add Kernel Isolate"
This reverts commit c9399fc557.

The change broke Dartium and Fuchsia.

BUG=

Review URL: https://codereview.chromium.org/2554953004 .
2016-12-06 14:17:09 -08:00
Matthias Hausner c9399fc557 Add Kernel Isolate
To run a script with the Dart->Kernel parser, use the -dfe option:

dart --dfe=runtime/tools/kernel-service.dart  --packages=/src/d2/sdk/.packages  foo.dart

The front end expects a directory named patched_sdk in the build directory (patched_sdk should be a sibling of the directory that contains the dart executable.)

Warning: using a debug build dart executable is very slow. It takes 2 minutes to run Hello World in a debug build, and about 7 seconds in a release build.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2483373002 .
2016-12-06 12:23:09 -08:00