From dev-return-38540-apmail-harmony-dev-archive=harmony.apache.org@harmony.apache.org Wed Nov 25 18:46:10 2009 Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 95328 invoked from network); 25 Nov 2009 18:46:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Nov 2009 18:46:10 -0000 Received: (qmail 29794 invoked by uid 500); 25 Nov 2009 18:46:09 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 29732 invoked by uid 500); 25 Nov 2009 18:46:08 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 29721 invoked by uid 99); 25 Nov 2009 18:46:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Nov 2009 18:46:08 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gshimansky@gmail.com designates 209.85.218.210 as permitted sender) Received: from [209.85.218.210] (HELO mail-bw0-f210.google.com) (209.85.218.210) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Nov 2009 18:45:59 +0000 Received: by bwz2 with SMTP id 2so7801603bwz.20 for ; Wed, 25 Nov 2009 10:45:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=b6khmRv+P2AK4DVOnmeDeZcBZsYVvvuLJMSABJh5pvg=; b=g3siYOkqBqRLya9msZICL/ZE2FQofmGy+yhCi9UwHhZDyYTacIoSvhEMy51Vs3LdDv xD9zUhCTyDWom/dcYWqe9EXzfVP7B0H+LEHukc4aErc5HipdzItdXK4GmF1MCHAVHL0L L54LwFoY5ERpXeFfClWjARZdGrvCInY9gOeG4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; b=FEhe3Bktj4vaH3UattARKI4IFTnMGTj0uxThJl44lsvmiv+97WBe7sI/MteQa+Pzzu L4bdRnVhSVcjaZxj+eus8kkG2e/PtM9xfoaEwSZVP9e7CpWg7GpPYWcgaLqvxzbG+ays U5iVatUpFkJOxIXoeAx7KH97BusNHhxK10JkA= Received: by 10.204.154.85 with SMTP id n21mr7711679bkw.171.1259174739194; Wed, 25 Nov 2009 10:45:39 -0800 (PST) Received: from desktop.localnet ([95.84.195.26]) by mx.google.com with ESMTPS id 15sm1826395bwz.4.2009.11.25.10.45.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Nov 2009 10:45:37 -0800 (PST) From: Gregory Shimansky To: dev@harmony.apache.org Subject: Re: [DRLVM][JVMTI]a bug when running SpecJVM98 _201_compress Date: Wed, 25 Nov 2009 21:45:24 +0300 User-Agent: KMail/1.12.1 (Linux/2.6.30-gentoo-r5-em64t; KDE/4.3.1; x86_64; ; ) References: <200911260027504782211@gmail.com> In-Reply-To: <200911260027504782211@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Message-Id: <200911252145.24288.gshimansky@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org IIRC VMDeath is not sent if System.exit is used by application. This is a limitation of JMVTI implementation in DRLVM. Most likely Spec uses exit to finish. > Hi all, > I'm doing some tuning work for Harmony running SpecJVM98. > I write a JVMTI agent to catch VMDeath event and do something at the end of > JVM's life, but that doesn't work(the same agent work well for hotspot). > > my agent likes bellow: > ... > static void JNICALL > callbackVMDeath(jvmtiEnv *jvmti, JNIEnv *jni) > { > assert(false); > printf("vm death\n"); > } > JNIEXPORT void JNICALL Agent_OnUnload(JavaVM *jvm) > { > assert(false); > printf("unload!"); > } > JNIEXPORT jint JNICALL Agent_OnLoad(JavaVM *jvm, char *options, void > *reserved) { > ... > error = jvmti->SetEventNotificationMode(JVMTI_ENABLE,JVMTI_EVENT_VM_DEATH, > (jthread)NULL); callbacks.VMDeath = &callbackVMDeath; > error = jvmti->SetEventCallbacks(&callbacks,(jint)sizeof(callbacks)); > ... > } > ... > The program ends correctly. This is really strange. Can anyone try this > case and explain for me? > > Thanks a lot. > > 2009-11-26 > > > > johnnylj98 >