Commit Graph

185 Commits

Author SHA1 Message Date
johnmccutchan@google.com 15eff079d7 Collect samples during isolate startup
BUG=
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35522 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-29 14:17:31 +00:00
iposva@google.com fd8565b071 - Add a minimal implementation of Capability.
- Make RawReceivePort and SendPort VM internal objects.
- Rationalize the creation of ports and their handling within the VM.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35325 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 19:44:03 +00:00
asiva@google.com a561e2bd17 1. Provide a framework to traverse persistent prolog weak handles.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35066 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-15 16:32:55 +00:00
johnmccutchan@google.com febba444a4 Fix heap report bug and add checked mode display to VM page
BUG=
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35060 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-15 14:16:15 +00:00
johnmccutchan@google.com 8f0056371d Initial UserTag and dart:profiler library
R=asiva@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34949 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 22:32:45 +00:00
johnmccutchan@google.com ef666553a1 Add runtime and native entry tags
- Split runtime and native entry tags.
- Set runtime / native entry address as vm tag in stubs.
- Add reverse native entry resolver (pc to name) to public API (breaking change).
- Hookup reverse resolver for standalone VM (io + bootstrap + builtin natives).
- Runtime entries are registered with tags.
- Profiler queries for tag names via the reverse native entry resolver.
- Profiler outputs named entry tags as children under parent tag (runtime or native).

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34941 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 20:26:45 +00:00
turnidge@google.com 1eba6be2b2 Implement new stacktrace and deoptimization stress testing flags:
--deoptimize-every=N
--deoptimize-filter=FunctionName
--stacktrace-every=N
--stacktrace-filter=FunctionName

Add a word of stack_overflow_flags to the Isolate.  Use a bit in this
word to indicate whether or not a function is being compiler for OSR.
This allows us to distinguish an OSR overflow from a stress-testing
overflow.

BUG=
R=johnmccutchan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34887 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 18:27:37 +00:00
johnmccutchan@google.com 431761e878 Miscellaneous Observatory UI improvements
Update cursor over expander in profiler

Ressurect json-view

Show arrow in profiler tree

Clicking on <code-ref> link in profiler doesn't expand tree

<code-ref> only shows a link for Dart code

Port script-view to use script-inset

Add function source to function view

Add counters to isolate view

Add counters to isolate summary

R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34661 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 18:30:01 +00:00
turnidge@google.com 99fca31c02 Support Types in instance-ref/instance-view.
Refactor JSON printing for all instances to share more code.  This allows Types to act like Instances in Observatory.

Update the look and feel for the function-view page.

Add script info for functions.

Update tests.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34435 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 17:13:03 +00:00
johnmccutchan@google.com 182fcd0921 Add isolate tag-profile model and UI.
Distinction between a Dart Error and a ServiceError/ServiceException.
Better Observatory behaviour when a ServiceError/ServiceExceptions occurs.
Display isolate's sticky error.

R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34377 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-25 18:09:02 +00:00
asiva@google.com 8c2df33d13 Use a bit in the handle structure to indicate if it is a prologue weak handle instead of the tagging the address.
R=koda@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34258 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-21 17:23:33 +00:00
turnidge@google.com 9c5c7040dc Add a VM page to the observatory.
Make the VM a ServiceObject.  Some refactoring in the ServiceObject
implementation.

IsolateList is no longer a ServiceObject.  It should eventually become more like our caches.

Support the /vm request in the vm.  Remove isolate list request.

Improvements to Isolate::PrintToJSONStream: always provide a
reasonable name.  Use the same code to produce isolate refs and
non-refs.

Improve isolate status message when the isolate is paused at
start/exit.  Add a resume link to the isolate view.

Add a navbar to the error page so that dartium users are less likely
to get stuck.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34204 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-20 21:00:10 +00:00
regis@google.com fe667b6d9a Support displaying of types in the observatory (back-end only for now):
- canonical type arguments cached in the global hash table
- subset of the above, but with cached instantiations
- canonical types cached by the type class

And of course, it should now be possible to display any type, e.g.
field types, function signature types, classes super types, interface types,
etc...

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34181 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-20 16:41:59 +00:00
johnmccutchan@google.com 95b2427f6f Support wedging isolates before startup or before exit.
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34079 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-18 23:32:36 +00:00
johnmccutchan@google.com 762b9a400c Set VMTag from stubs when transitioning between Dart and Native
R=asiva@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34065 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-18 21:26:07 +00:00
johnmccutchan@google.com 25146ce058 Basic tag infrastructure
BUG=
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33701 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-14 16:16:21 +00:00
iposva@google.com 021fca847c - Implement a PauseTimerScope so that we can properly exclude
times when a TimerScope is active.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33662 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-13 20:38:24 +00:00
asiva@google.com a611f736e0 Remove the ability to allow multiple gc prologue and gc epilogue callbacks
to be registered at any given time. Dartium seems to use only one.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33622 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-12 22:39:15 +00:00
asiva@google.com 3af18cc4c0 1. Restructure reusable handles to make individual Scopes for each handle type
2. Add a convenience macro to make use of reusable handle scopes easier

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33471 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-08 00:26:29 +00:00
koda@google.com 0d8a9e7e4a Missing file from r33467.
TBR=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33469 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 23:59:29 +00:00
asiva@google.com a01ab16991 1. When reading a full snapshot use the class id from the snapshot instead
of generating a new one. This ensures that assumptions made about the
   class id when generating a snapshot will still hold in the version that
   runs from a snapshot.

2. remove ObjectHistogram code as it is not used anymore and has been replaced
   by VM service.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33340 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-05 19:24:02 +00:00
asiva@google.com e380b175f8 Pass in the isolate parameter to the weak persistent callback handler so that
there is no need to access the current isolate in the callback and delete
path (this code is run while a GC is in progress).

See https://codereview.chromium.org/185643003/ for corresponding changes
in dartium

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33282 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 18:11:19 +00:00
asiva@google.com 8e0129970c Use a tag bit for indicating prologue weak persistent handles, this avoids
the costly lookup to determine if a handle is a prologue weak persistent
handle or a regular weak persistent handle in Dart_DeleteWeakPersistentHandle

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33254 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 00:35:45 +00:00
johnmccutchan@google.com 7aefd3e945 Add flag to pin and service command to release isolates
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33125 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-27 18:14:51 +00:00
fschneider@google.com 16857e0b13 Revert r32930 (Add more timing information in the VM to track time...)
It caused severe performance regressions that should be addressed.

TBR=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32959 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 12:15:55 +00:00
asiva@google.com 6d313d3797 Add more timing information in the VM to track time spent is dart code Vs native code.
R=johnmccutchan@google.com, turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32930 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 21:30:29 +00:00
johnmccutchan@google.com 5ab0c8e73d Switch from linear search for code region to binary search.
Add a SampleVisitor for iterating over SampleBuffer.
Move stack walking class out of header into source file.

Processing 6.5 million stack frames went from 28 seconds to 741 millis.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32809 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 19:15:16 +00:00
johnmccutchan@google.com 86c55f4fde Keep list of existing isolates.
List is only updated when isolates are created / destroyed.
ThreadInterrupter now walks list of isolates.
Scheduling an isolate for interrupts is now lockless.
Setting a current isolate is now lockless.
Working on Linux, Mac, and Windows.
Assert that the isolate isn't on two threads at once.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32439 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 17:43:21 +00:00
srdjan@google.com 8b7ebed54f Mark optimized code that used CHA for optimization so that lazy class 'finalization' does not invalidate that code.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32335 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-05 20:31:57 +00:00
johnmccutchan@google.com 8c7020e422 Add Google Charts to Observatory and use it in allocation profiler
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32142 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-29 21:51:25 +00:00
turnidge@google.com b891e78325 Post-meetup feature extravaganza.
Remodel the top-level isolate summary page.

Add variables to stack frames in the stack trace.

Stop putting small integers and bools in the object id ring.

Rework how we pass down null references (and null-like references like
uninitialized values).

Collect all isolate timers by default.

Change the lifetime of IsolateSpawnState so that we can refer to it
later to know how an isolate started up.  Stop pretending that
IsolateSpawnState is a void*.  Clean up vestigial IsolateStartData.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32128 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-29 18:40:12 +00:00
turnidge@google.com 12f8555b19 Allow root level requests in the vm service.
Move /cpu to the root level.

Move PostReply to the command handlers.  This will allow command
handlers to reply asynchronously (by delegating elsewhere) if they
need to.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31849 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 20:45:39 +00:00
johnmccutchan@google.com c76b6eb1c2 Split service into VM and embedder specific bits.
Move most service sources into the VM.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31809 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-14 22:34:43 +00:00
asiva@google.com 9fb8b89682 1. Delete prolog weak persistent handles when shutting down an isolate
2. Remove the peer_ field from RawExternalTypedData as it is not used anywhere

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31797 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-14 19:55:46 +00:00
johnmccutchan@google.com 7da1f4f3ba Build map of code regions and address ticks for profile report.
Profile pauses should be less than 500 ms even when handling 120,000 samples (2 minutes @ 1000 hz).
Code objects are referenced by hex address: "code/cafebabe".
Test for retrieving code objects over the service.
Remove old profile tool scripts. Replaced by dprof (https://github.com/dart-lang/dprof) and Observatory UI for profiler.
Support for stable service refs to implicit closures and dispatcher functions.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31447 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-03 19:55:50 +00:00
iposva@google.com 1e8061f060 - Remove the reply_port from the VM internal message object.
- Adjust all the uses of this API.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31205 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-17 21:11:18 +00:00
johnmccutchan@google.com 919dc2d6eb * Introduce ThreadInterrupter which calls a TLS set callback when thread is interrupted.
* Threads can only register and unregister themselves with ThreadInterrupter.
* Profiler is no longer involved in interrupting threads. It's just a callback and the buffer.
* Profiler operates lock free using an atomic operation to reserve sample in sample buffer.
* Linux, Mac, and Windows done.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31170 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-16 18:52:15 +00:00
srdjan@google.com 3274f92827 Rename FinalizeTypeHierarchy to ProcessPendingClasses.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30688 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-27 00:11:32 +00:00
johnmccutchan@google.com f6459c2dcc - SetupIsolateForProfiling before SetCurrent is called on an isolate for the first time.
- ProfilerManager::Shutdown no longer frees isolate profiling data for registered isolates. Each isolate will free its own data when shutdown.
- Fix monitor timeout test to disable signal delivery.
- Do not walk the call stack in signal handler.

TBR

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30607 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-24 23:33:41 +00:00
johnmccutchan@google.com 65e7b9f980 - Fix shutdown race.
- Move signal blocking out of dart.cc and isolate.cc and into profiler.cc.
- Nest scope objects explicitly.
- Add missing signal block in ProfilerManager::ShutdownIsolateForProfiling.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30602 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-23 00:26:35 +00:00
srdjan@google.com 3485989ae7 Do not eagerly finalize classes in CHA, instead regard unfinalized classes as ’non-existent’ and only invalidate optimized code at finalization of the class.
Rename FinalizePendingClasses to FinalizePendingClassInterfaces as the class finalization occurs lazily.
TODO: add dependency information to deoptimize/remove only relevant optimized code.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30582 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-22 17:59:23 +00:00
lrn@google.com ed814958fc Fix VM not accepting static methods for Isolate.spawn.
BUG= http://dartbug.com/3011

Committed: https://code.google.com/p/dart/source/detail?r=30300

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30442 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 09:14:30 +00:00
johnmccutchan@google.com 97ac18aee9 Sampling profiler
BUG=4350
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30419 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 18:26:10 +00:00
iposva@google.com 8b51ded2fb - Convert heap sizes to words from bytes.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30325 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-16 00:17:52 +00:00
lrn@google.com ab18829ae4 Revert "Fix VM not accepting static methods for Isolate.spawn."
Comitted by mistake.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30301 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-15 11:23:47 +00:00
lrn@google.com b0e40ddc70 Fix VM not accepting static methods for Isolate.spawn.
BUG= http://dartbug.com/3011

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30300 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-15 10:28:32 +00:00
iposva@google.com 070d3dedf7 - Add a per-isolate pseudo random number generator to the
VM internals. This PRNG is not used to generate random
  numbers in Dart code.
- Use the PRNG to generate JIT cookies for large constants
  if needed during assembly.
- Add the possibility to set an external entropy source
  for the PRNG through the C API.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29950 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 00:59:46 +00:00
iposva@google.com 3dced243b3 Fix http://dartbug.com/14763
- Find main in the exported names of the root library.
- Unify how the main function is called from spawnUri
  and the initial isolate.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29865 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 00:55:41 +00:00
sgjesse@google.com 36a67fa046 Implement fromEnvironment on bool, int and String
This implements const constructor fromEnvironment on bool, int and
String.

The VM have the added -Dname=value option to define the value for the
properties. All values are provided by using the -D - nothing is read
from the environment.

If the resulting value is null or - in the case of int.fromEnvironment
- not a number an ArgumentError is thrown.

This CL does not have any implementation for dart2js.

This is a continuation of the change
https://chromiumcodereview.appspot.com/24975002 by iposva@
BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29642 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 05:46:57 +00:00
iposva@google.com 2ed438e40c Reland https://code.google.com/p/dart/source/detail?r=29315:
- Make sure to keep the main/control port opened until the
  isolate is finished.
- Account for the number of opened control ports to be able
  to determine whether there are live ports.
- Ensure that the spawned isolated is kept alive until the
  initial startup message can be handled.
- Add more isolate tracing output.
- Use the control port for the debugger id.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29323 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-27 14:34:23 +00:00