Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 70215 invoked from network); 15 Jan 2008 02:38:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jan 2008 02:38:29 -0000 Received: (qmail 18148 invoked by uid 500); 15 Jan 2008 02:38:17 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 18110 invoked by uid 500); 15 Jan 2008 02:38:17 -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 18095 invoked by uid 99); 15 Jan 2008 02:38:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jan 2008 18:38:17 -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 (athena.apache.org: domain of simon.harmony@gmail.com designates 209.85.146.180 as permitted sender) Received: from [209.85.146.180] (HELO wa-out-1112.google.com) (209.85.146.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jan 2008 02:37:51 +0000 Received: by wa-out-1112.google.com with SMTP id k22so4284444waf.18 for ; Mon, 14 Jan 2008 18:37:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=HCu8Il9JO6qRwLhfJH20Odms32xvH3L9cxYjD6RUkAg=; b=oiGXpWQm+3XB9HY7NEK4ZoRTd7Q5zHfG8fItVLnaLWqsNgolF9zRL60xxZ49/21Bzs16VVNKHox7JSti4m/Ff2RNX/pyELOS3YqxoVQSq6cmPQY6M7yTB5OOJYWIOJ6Q1YB9QULnVN8WW1r+bOv+qIlpww4c7ev6qPNxlnJE/yk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=UzDBgka0VhGJFe0rzthvf5WmUweMYbq6CsRAAxJFZM/53WmyQsM9oFII6zVyqer3zgrmqDcmte/Q7z29c3KNKThi+VrnJTTUuN9HSLrwk5glOHOoAKPpI1n9qNA+m+ZB326E96UKqCEOoWP6g+03wKjYVQyp4XzKNgXTtSfP0gA= Received: by 10.114.12.9 with SMTP id 9mr4915864wal.23.1200364676808; Mon, 14 Jan 2008 18:37:56 -0800 (PST) Received: by 10.114.81.7 with HTTP; Mon, 14 Jan 2008 18:37:56 -0800 (PST) Message-ID: <3db9f87f0801141837m6a8abb1auf90c500d731e5dd3@mail.gmail.com> Date: Tue, 15 Jan 2008 10:37:56 +0800 From: "Simon Chow" To: dev@harmony.apache.org Subject: Re: [drlvm][jitrino]A question of pipeline and method filter In-Reply-To: <0vqzlvdlo9o.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_19765_27634670.1200364676797" References: <3db9f87f0712170035y2cc0bff0oec13fc922077865c@mail.gmail.com> <3db9f87f0712170206l1f84382bqe0b3b72cb837450e@mail.gmail.com> <3db9f87f0712170226l42ab5bd3m1509f0458dee6beb@mail.gmail.com> <0vqy7bsnu1a.fsf@gmail.com> <3db9f87f0801100611w70d187fdwbd8c1535fbda8c6f@mail.gmail.com> <0vqzlvdlo9o.fsf@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_19765_27634670.1200364676797 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 10 Jan 2008 17:59:47 +0300, Egor Pasko wrote: > > On the 0x3C7 day of Apache Harmony Simon Chow wrote: > > On 18 Dec 2007 14:04:17 +0300, Egor Pasko wrote: > > > > > > On the 0x3AF day of Apache Harmony Simon Chow wrote: > > > > Is there any analysis tools automatically choosing optimization path > for > > > my > > > > source code. > > > > If no, > > > > Do you think such a tool can help developers a lot for archiving > better > > > > performance on Harmony. > > > > I am trying to do some research for OPT, expecting for your advice. > > > Thanks! > > > > > > Simon, > > > > > > I just want to add some of my long thoughts.. :) > > > > > > JITs aim at solving the problem of optimizing code with more or less > > > universal approaches. We have this great tool as compilation pipeline > > > management for developers' ability to experiment. JIT is already > > > overly complicated with many pipeline phases influencing each other > > > sometimes in very unexpected ways :) > > > > > > I do not believe in just-in-time meta-optimization because even the > > > optimization tool (without meta) is already very complicated. However, > > > if a user is ready to pay a lot if time to get a real bang in > > > performance (of a single method or the whole app), they should > > > consider searching in the big space of JIT configurations > > > automatically, where some not very intelligent artificial intelligence > > > might be promising here. > > > > > > Sorry for a late reply. > > Thank you for sharing so much thoughts! :) > > > > I have rethinked this question recently. > > I strongly agree that it hard to write a program with such intelligence. > > And I am curious about intelligent artificial intelligence you said :) > What > > is the method of searching configuration space? > > that's a big subject of machine learning. There are a bunch of methods > with lots of modifications: Support Vector Machine (SVM), genetic > algorithms, neural networks, boosting, etc. There is a wikipedia link > collecting them: > > http://en.wikipedia.org/wiki/Machine_learning > > wanna dive into this nightmare? :) > > > Despiting the untested passes, Is there any possibility changing the > > pipeline configuration (or create a new pipeline) for a particular set > of > > method which may archive better performance with some optimization pass > by > > analyzing profiling information? > > Do you want to implement a function that takes profile as parameter > and tells which optpass to use? Yes :) Currently such tricks in Execution Manager are not supported, you can > only set optimization passes based on method names (or parts of method > names, for example, we construct different path for "...::" > methods that run only once") > > And I doubt one can write a sane function that tells which pass to use > based on profile (and maybe bytecode supplemented). Why is it? In my view, Hotspot uses profile to find 'hot section' and direct its recompilation at runtime. I think this is similar to 'change pass based on profile', isn't it? Thanks! So, I probably > misunderstood you. > > > Thanks > > > > I suggest to apply artificial intelligence here because anyway we > > > won't be able to understand what configurations are best using our own > > > brains and hence we won't be able to write code for that. > > > > > > But be prepared to see that: > > > > > > a) not many of possible JIT pipelines make sense in terms of both > > > compile-time and run-time performance plus memory footprint > > > > > > b) very little number of configurations would work in a stable way > > > (because we do not test them, and some optimization passes are > > > documented to work only in specific conditions, i.e. other > > > optimizations preceded) > > > > > > What do you think? > > > > > > > On 17/12/2007, Mikhail Fursov wrote: > > > > > > > > > > On Dec 17, 2007 4:06 PM, Simon Chow > wrote: > > > > > > > > > > > Thank you very much! > > > > > > > > > > > > So users should choose pipeline for methods before execution, > isn't > > > it? > > > > > > > > > > Yes. > > > > > > > > > > > > > > > > Then I wants to know how to build a pipeline with the most > efficient > > > > > > compilation result of a specified method. Does it rely on the > > > > > developer's > > > > > > experience? > > > > > > > > > > > > Yes, it depends on developer's experience and on optimizations > you > > > > > expect > > > > > to work for your method. E.g. if you know that your hot-spot > method > > > > > benefits > > > > > from particular optimization - you just add it to the optimization > > > path > > > > > and > > > > > tune it to do the best job for your method. > > > > > > > > > > -- > > > > > Mikhail Fursov > > > > > > > > > > > > > > > > > > > > > -- > > > > From : Simon.Chow@Software School of Fudan University > > > > > > -- > > > Egor Pasko > > > > > > > > > > > > -- > > From : Simon.Chow@Software School of Fudan University > > -- > Egor Pasko > > -- >From : Simon.Chow@Software School of Fudan University ------=_Part_19765_27634670.1200364676797--