From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23747 invoked by alias); 12 Sep 2011 10:08:19 -0000 Received: (qmail 23734 invoked by uid 22791); 12 Sep 2011 10:08:17 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_GC X-Spam-Check-By: sourceware.org Received: from mail-qw0-f52.google.com (HELO mail-qw0-f52.google.com) (209.85.216.52) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Sep 2011 10:08:01 +0000 Received: by qwb8 with SMTP id 8so3396245qwb.11 for ; Mon, 12 Sep 2011 03:08:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.68.232 with SMTP id w40mr316067qci.137.1315822079927; Mon, 12 Sep 2011 03:07:59 -0700 (PDT) Received: by 10.229.74.81 with HTTP; Mon, 12 Sep 2011 03:07:59 -0700 (PDT) In-Reply-To: References: Date: Mon, 12 Sep 2011 10:08:00 -0000 Message-ID: Subject: Re: About compiling process in GCJ and garbage collection From: Bryce McKinlay To: Li junsong Cc: java@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg00009.txt.bz2 On Sun, Sep 11, 2011 at 8:22 PM, Li junsong wrote: > if I use GCJ to compile the java source code to machine code directly, > =A0it will first use ecj to compile java source to bytecode, and then > compile the bytecode(or other information) to machine code.( right? ) Correct. > BUT, I write a plugin, which removes a certain statement in gimple > tree, and the gcj dump the gimple tree into file. The plugin works. > That means that =A0GCJ does do something in the process =A0of compiling > the source code, otherwise the ecj MUST use the same tree > structure(GENERIC, GIMPLE) as gcc does No, ecj does not share any tree data with GCC, other than the bytecode itself. ecj produces .class files, which gcj parses to produce the GENERIC tree which is dispatched to GCC's optimizers and back end. Your plugin runs at this stage of the compile process. > I have tried the usage of "gcj -v" to print the compiling information, > and I see there are a few files being produced in /tmp, I think that > it is the bytecode of java code, or the STRING type stuff( because I > didn't find any string in the dumped file. ) Try using -save-temps as well to get more human-readable names for the intermediate files. Bryce