diff options
author | Elliott Hughes <enh@google.com> | 2011-10-24 16:58:50 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2011-10-24 16:58:50 -0700 |
commit | d1cc8363d4f4bbac7568b1d02a5ca481cd10830f (patch) | |
tree | df0c401ed6d5e4e9153268c3f336ead459a84cfc /src/runtime.cc | |
parent | 4ffd31315bc0d00ec278e85feed15985de5ac3dc (diff) | |
download | art-d1cc8363d4f4bbac7568b1d02a5ca481cd10830f.zip art-d1cc8363d4f4bbac7568b1d02a5ca481cd10830f.tar.gz art-d1cc8363d4f4bbac7568b1d02a5ca481cd10830f.tar.bz2 |
Wire up enough of the pieces that we can connect ddms or jdb.
(And die with an UNIMPLEMENTED as soon as they connect, of course.)
Change-Id: I9abb25d581384361c215b3cd96b8278c751e79ea
Diffstat (limited to 'src/runtime.cc')
-rw-r--r-- | src/runtime.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/runtime.cc b/src/runtime.cc index a144c44..5f2eddd 100644 --- a/src/runtime.cc +++ b/src/runtime.cc @@ -56,6 +56,8 @@ Runtime::Runtime() } Runtime::~Runtime() { + Dbg::StopJdwp(); + // Make sure our internal threads are dead before we start tearing down things they're using. delete signal_catcher_; // TODO: GC thread. @@ -402,7 +404,9 @@ void Runtime::Start() { // come after ClassLinker::RunRootClinits. started_ = true; - StartSignalCatcher(); + if (!is_zygote_) { + DidForkFromZygote(); + } StartDaemonThreads(); @@ -416,9 +420,13 @@ void Runtime::Start() { } void Runtime::DidForkFromZygote() { - CHECK(is_zygote_); is_zygote_ = false; + StartSignalCatcher(); + + // Start the JDWP thread. If the command-line debugger flags specified "suspend=y", + // this will pause the runtime, so we probably want this to come last. + Dbg::StartJdwp(); } void Runtime::StartSignalCatcher() { |