From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4383 invoked by alias); 11 May 2006 20:12:11 -0000 Received: (qmail 4373 invoked by uid 22791); 11 May 2006 20:12:10 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 11 May 2006 20:12:09 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4BKC76A009445 for ; Thu, 11 May 2006 16:12:07 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k4BKC2D7009472 for ; Thu, 11 May 2006 16:12:02 -0400 Received: from [172.16.14.227] (IDENT:AyuCDD7GKfIpWdX/MDy3xhwjYOBdKaqk@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k4BKC1Ac030594 for ; Thu, 11 May 2006 16:12:01 -0400 Message-ID: <44639A91.1010401@redhat.com> Date: Thu, 11 May 2006 20:12:00 -0000 From: Dave Brolley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: sid@sources.redhat.com Subject: [patch][commit] Dynamic Configuration Part 2 Content-Type: multipart/mixed; boundary="------------000800040407010600080308" X-IsSubscribed: yes Mailing-List: contact sid-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00028.txt.bz2 This is a multi-part message in MIME format. --------------000800040407010600080308 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 412 Hi, I've committed this patch which is a couple fo tweaks to the dynamic configuration and profiling interfaces. basic_cpu::cg_profile and basic_cpu::cg_profile_jump are now virtual to allow for hooks by inheriting classes. basic_cpu::dynamic_config has been added in order to force --insn-count=1 when --trace-counter is on. This is needed in order that total_insn_count is updated after each insn. Dave --------------000800040407010600080308 Content-Type: text/plain; name="sid-dynamic-config2.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sid-dynamic-config2.ChangeLog" Content-length: 166 2006-05-11 Dave Brolley * sidcpuutil.h (cg_profile): Now virtual. (cg_profile_jump): Now virtual. (dynamic_config): New vritual override. --------------000800040407010600080308 Content-Type: text/plain; name="sid-dynamic-config2.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sid-dynamic-config2.patch.txt" Content-length: 2395 Index: sid/include/sidcpuutil.h =================================================================== RCS file: /cvs/src/src/sid/include/sidcpuutil.h,v retrieving revision 1.34 retrieving revision 1.35 diff -c -p -r1.34 -r1.35 *** sid/include/sidcpuutil.h 27 Mar 2006 20:30:06 -0000 1.34 --- sid/include/sidcpuutil.h 11 May 2006 19:29:51 -0000 1.35 *************** *** 1,6 **** // sidcpuutil.h - Elements common to CPU models. -*- C++ -*- ! // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat. // This file is part of SID and is licensed under the GPL. // See the file COPYING.SID for conditions for redistribution. --- 1,6 ---- // sidcpuutil.h - Elements common to CPU models. -*- C++ -*- ! // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat. // This file is part of SID and is licensed under the GPL. // See the file COPYING.SID for conditions for redistribution. *************** namespace sidutil *** 354,360 **** { this->step_cycles_pin.drive (n); } ! void cg_profile (sid::host_int_4 caller, sid::host_int_4 callee) { last_caller = caller; last_callee = callee; --- 354,360 ---- { this->step_cycles_pin.drive (n); } ! virtual void cg_profile (sid::host_int_4 caller, sid::host_int_4 callee) { last_caller = caller; last_callee = callee; *************** namespace sidutil *** 373,379 **** << " "; } } ! void cg_profile_jump (sid::host_int_4 caller, sid::host_int_4 callee) { last_caller = caller; last_callee = callee; --- 373,379 ---- << " "; } } ! virtual void cg_profile_jump (sid::host_int_4 caller, sid::host_int_4 callee) { last_caller = caller; last_callee = callee; *************** namespace sidutil *** 647,652 **** --- 647,664 ---- } } + virtual component::status dynamic_config(const string& spec) + { + // Call up to the base class + component::status s = configurable_component::dynamic_config (spec); + + // Check whether insn-count must be forced to 1 + if (trace_counter_p) + configure ("insn-count=1"); + + return s; + } + // state save/restore: Override these in derived classes, but // include a call up to this base implementation. protected: --------------000800040407010600080308--