Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 61034 invoked from network); 18 Dec 2006 10:02:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Dec 2006 10:02:04 -0000 Received: (qmail 50242 invoked by uid 500); 18 Dec 2006 10:02:08 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 50210 invoked by uid 500); 18 Dec 2006 10:02: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 50201 invoked by uid 99); 18 Dec 2006 10:02:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Dec 2006 02:02:08 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of eugene.s.ostrovsky@gmail.com designates 64.233.182.189 as permitted sender) Received: from [64.233.182.189] (HELO nf-out-0910.google.com) (64.233.182.189) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Dec 2006 02:01:58 -0800 Received: by nf-out-0910.google.com with SMTP id a4so1926981nfc for ; Mon, 18 Dec 2006 02:01:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=CHCl9dSRhNCsxvt+iAXumH3fsk4tkeVbq4qwT3Is5lKLH8FsooOzF1yvcH3mj1yJJCvcOcoqtC5dhvcn0UEfbjG3zT5qaGvkUFcoYc6sp1uaTFS3QIa9wk/SxtiS7xH0STl3uecWD5X9y2bAHAf9JwvLu+KaFbnkhQq2iA+WKMc= Received: by 10.49.12.4 with SMTP id p4mr4765504nfi.1166436096682; Mon, 18 Dec 2006 02:01:36 -0800 (PST) Received: by 10.49.59.14 with HTTP; Mon, 18 Dec 2006 02:01:36 -0800 (PST) Message-ID: <1e3228450612180201j63c2f3d1g1f1415ca75897f63@mail.gmail.com> Date: Mon, 18 Dec 2006 13:01:36 +0300 From: "Eugene Ostrovsky" To: dev@harmony.apache.org Subject: Re: [drlvm][jvmti] Profiling support - Compiled Method Load event In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11679_16198033.1166436096269" References: <1e3228450611100406n1d0ea58fp2c778fb9a3c49458@mail.gmail.com> <1e3228450612140020o10ee11b9kf68f00032467645f@mail.gmail.com> <1e3228450612150319i72f378e9wd3132804842d0613@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_11679_16198033.1166436096269 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Let me propose the following design: Compiled method load event. More precise specification for inlined methods. 1. CML event must be sent for every method compiled by JIT. If compiled method code is disposed in several disconnected regions each of them must be reported by separate CML event. Each region location is described by code_addr and code_size parameters. Native addresses to bytecode location correspondence should be described in map parameter if this information is available. If compiled method code contains code blocks of inlined methods the addresses of those blocks should be associated with the location of corresponding invoke bytecode instruction. 2. If compiled method code region was inlined within the code region of the outer method it should be reported by separate CML event. Inlined method code region must be enclosed within one of the outer method's code regions. I.e. outer.start <= inlined.start < inlined.end <= outer.end (where method.start = code_addr , method.end = code_addr + code_size - 1) 3. According to #1 and #2 any two of reported regions (R1, R2) may by enclosed one by other (in case of inlining) but must not overlap (i.e. R1.start < R2.start <= R1.end < R2.end condition must not be true). Is it clear enough? What do you think? On 15 Dec 2006 18:36:22 +0600, Egor Pasko wrote: > > On the 0x240 day of Apache Harmony Eugene Ostrovsky wrote: > > I experimented with sun and bea vms. > > did you try HotSpot for JSE 6 (with attach anytime feature)? > > > None of them report inlined methods. > > > > Thus we need to make a decision by ourselves. > > :) yes > > > On 14 Dec 2006 16:14:49 +0600, Egor Pasko wrote: > > > > > > On the 0x23F day of Apache Harmony Eugene Ostrovsky wrote: > > > > I'll try to make test to investigate RI behavior. > > > > > > thank you thank you thank you > > > > > > > On 13 Dec 2006 16:34:46 +0600, Egor Pasko > wrote: > > > > > > > > > > On the 0x23E day of Apache Harmony George Timoshenko wrote: > > > > > > Egor, > > > > > > > > > > > > thanks for clear scheme. > > > > > > > > > > > > In your terms I'd do something like this: > > > > > > > > > > > > * firstly - raise event for X: > > > > > > CompiledMethodLoad(start=X.1.start, > > > > > > method_size=X.1.size + X.2.size, > > > > > > addr_loc_map= > > > > > > [X.1.start -> bcoff1, > > > > > > X.2.start -> bcoff2]) > > > > > > * secondly - raise event for Y: > > > > > > CompiledMethodLoad(start=Y.1.start, > > > > > > method_size=Y.1.size, > > > > > > addr_loc_map= > > > > > > [Y.1.start -> bcoff_Y]) > > > > > > > > > > good question! > > > > > > > > > > IMHO, code_addr and code_size outlines a region where method code > is > > > > > contained. In that case VM can quickly tell which method the IP > > > > > (instruction pointer) belongs to. So, I intentionally suggested > > > > > code_size=(X.1.size + Y.1.size + X.2.size) instead of (X.1.size + > > > > > X.2.size). > > > > > > > > > > BTW, Eugene, do you have some important observations of the RI > > > > > behaviour for us? > > > > > > > > > > > > For example, we have > > > > > > > some chinks of methods X and Y intermixed like this: > > > > > > > "X.1,Y.1,X.2". To overcome we may: > > > > > > > * raise a single event for X: > > > > > > > CompiledMethodLoad(start=X.1.start, > > > > > > > method_size=X.1.size + Y.1.size + > X.2.size > > > , > > > > > > > addr_loc_map= > > > > > > > [X.1.start -> bcoff1, > > > > > > > Y.1.start -> 0, > > > > > > > X.2.start -> bcoff2]) > > > > > > > * raise 2 events for X: > > > > > > > CompiledMethodLoad(start=X.1.start, > > > > > > > method_size=X.1.size, > > > > > > > addr_loc_map= > > > > > > > [X.1.start -> bcoff1]) > > > > > > > CompiledMethodLoad(start=X.2.start, > > > > > > > method_size=X.2.size, > > > > > > > addr_loc_map= > > > > > > > [X.2.start -> bcoff2]) > > > > > > > > > > > > > > I would highly appreciate if some JVMTI guru steps down from > > > Olymp > > > > > and > > > > > > > tells which of two is the best, or at least says what RI does > in > > > that > > > > > > > case (or, maybe, RI does not generate non-contigous blocks?) > > > > > > > > > > > > > > I like the second approach (raise 2 events) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Egor Pasko > > > > > > > > > > > > > > > > -- > > > Egor Pasko > > > > > > > > -- > Egor Pasko > > ------=_Part_11679_16198033.1166436096269--