From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14457 invoked by alias); 21 Apr 2010 22:36:41 -0000 Received: (qmail 14398 invoked by uid 22791); 21 Apr 2010 22:36:37 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SARE_MSGID_LONG45,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Apr 2010 22:36:32 +0000 Received: from kpbe18.cbf.corp.google.com (kpbe18.cbf.corp.google.com [172.25.105.82]) by smtp-out.google.com with ESMTP id o3LMaUNq024423 for ; Wed, 21 Apr 2010 15:36:30 -0700 Received: from pvg3 (pvg3.prod.google.com [10.241.210.131]) by kpbe18.cbf.corp.google.com with ESMTP id o3LMaSuD008955 for ; Wed, 21 Apr 2010 15:36:29 -0700 Received: by pvg3 with SMTP id 3so653870pvg.26 for ; Wed, 21 Apr 2010 15:36:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.141.91.13 with HTTP; Wed, 21 Apr 2010 15:36:28 -0700 (PDT) In-Reply-To: <1271882917-28580-1-git-send-email-vapier@gentoo.org> References: <1271882917-28580-1-git-send-email-vapier@gentoo.org> Date: Wed, 21 Apr 2010 22:36:00 -0000 Received: by 10.141.108.5 with SMTP id k5mr2538455rvm.66.1271889388673; Wed, 21 Apr 2010 15:36:28 -0700 (PDT) Message-ID: Subject: Re: [PATCH] sim: profile: implement --profile-file backend From: Doug Evans To: Mike Frysinger Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00714.txt.bz2 On Wed, Apr 21, 2010 at 1:48 PM, Mike Frysinger wrote: > The profile code already has options and handling for accepting a file to > write the profile output like the trace code, but it doesn't actually use > it. =A0At the moment, it simply opens the file at the start and closes it= at > the end. =A0So add two new local functions the way the trace code is doing > it and have them figure out whether to write the output to stdout or the > specified file. =A0Then convert all existing output in the profile code to > use these helpers. > > Signed-off-by: Mike Frysinger > --- > 2010-04-21 =A0Mike Frysinger =A0 > > =A0 =A0 =A0 =A0* sim-profile.c (profile_vprintf, profile_printf): New fun= ctions. > =A0 =A0 =A0 =A0(profile_print_pc): Convert sim_io_printf to profile_print= f. > =A0 =A0 =A0 =A0(profile_print_insn): Likewise. > =A0 =A0 =A0 =A0(profile_print_memory): Likewise. > =A0 =A0 =A0 =A0(profile_print_core): Likewise. > =A0 =A0 =A0 =A0(profile_print_model): Likewise. > =A0 =A0 =A0 =A0(sim_profile_print_bar): Likewise. > =A0 =A0 =A0 =A0(profile_print_speed): Likewise. > =A0 =A0 =A0 =A0(profile_print_addr_ranges): Likewise. > =A0 =A0 =A0 =A0(profile_info): Likewise. > =A0 =A0 =A0 =A0* sim-profile.h (sim_profile_print_bar): Add cpu argument. > This patch is ok. Thanks!