From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21986 invoked by alias); 19 Feb 2008 13:38:36 -0000 Received: (qmail 21978 invoked by uid 22791); 19 Feb 2008 13:38:36 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 19 Feb 2008 13:38:08 +0000 Received: from zps76.corp.google.com (zps76.corp.google.com [172.25.146.76]) by smtp-out.google.com with ESMTP id m1JDc398015697 for ; Tue, 19 Feb 2008 13:38:03 GMT Received: from wr-out-0506.google.com (wrac38.prod.google.com [10.54.54.38]) by zps76.corp.google.com with ESMTP id m1JDbhqG007344 for ; Tue, 19 Feb 2008 05:38:02 -0800 Received: by wr-out-0506.google.com with SMTP id c38so2012520wra.16 for ; Tue, 19 Feb 2008 05:38:02 -0800 (PST) Received: by 10.142.171.6 with SMTP id t6mr5323458wfe.44.1203428281911; Tue, 19 Feb 2008 05:38:01 -0800 (PST) Received: from frodo.local ( [66.46.136.44]) by mx.google.com with ESMTPS id 30sm19772568wfd.19.2008.02.19.05.37.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 19 Feb 2008 05:38:00 -0800 (PST) Message-ID: <47BACBA4.20401@google.com> Date: Tue, 19 Feb 2008 13:38:00 -0000 From: Diego Novillo User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Haifeng He CC: gcc-help@gcc.gnu.org Subject: Re: How to instrument a program using GCC References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-02/txt/msg00229.txt.bz2 On 2/18/08 11:12 PM, Haifeng He wrote: > Thanks for replying. I searched online but could not find much information about > GCC tree-profiling. GCC Internal also does not explain much on that. Is there > any other document explains that subject? Or some kind of tutorial or small > example that demonstrates how to manipulate GIMPLE tree will be also very > helpful. If you just want GCC to instrument your program, then reading on how to use the -fprofile-* switches should be enough. Both are in the user manual that comes with GCC. If you want to know *how* these options work, that's different. A good starting point is the GCC wiki. In particular, http://gcc.gnu.org/wiki/GettingStarted Diego.