From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12641 invoked by alias); 11 May 2006 20:34:02 -0000 Received: (qmail 12630 invoked by uid 22791); 11 May 2006 20:34:00 -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:33:57 +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 k4BKXuUZ017129 for ; Thu, 11 May 2006 16:33:56 -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 k4BKXuRu014507 for ; Thu, 11 May 2006 16:33:56 -0400 Received: from [172.16.14.227] (IDENT:7XKGOdRu5KwQgjU1HFeGJtrv63gBg45k@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k4BKXtAc031333 for ; Thu, 11 May 2006 16:33:55 -0400 Message-ID: <44639FB3.6090208@redhat.com> Date: Thu, 11 May 2006 20:34: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] SID configuration Content-Type: multipart/mixed; boundary="------------000709080302030805010409" 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/msg00029.txt.bz2 This is a multi-part message in MIME format. --------------000709080302030805010409 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 241 I've committed the attached patch which does two things: 1) Adds configuration support for hw-cache-buffer-N (previously committed) 2) Adds configuration to force --insn-count=1 when --trace-counter is supplied on the command line. Dave --------------000709080302030805010409 Content-Type: text/plain; name="sid-config.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sid-config.ChangeLog" Content-length: 789 2006-05-11 Dave Brolley * commonCfg.cxx (CacheCfg::CacheCfg (const string name)): Now takes a second argument for the size of the buffer. Initialize my_size using the size provided. Call compute_comptype. (compute_comptype): Use my_size to complete "hw_cache_buffer-". (BoardCfg): Initalize step_insn_count. Initialize step_insn_count_1_required. (BoardCfg::write_load): Set the cpu's step-insn-count based on step_insn_count_1_required. (set_step_insn_count): Just set step_insn_count here. (trace_counter): Set step_insn_count_1_required. * commonCfg.h (CacheCfg::CacheCfg (const string name)): Now takes a second argument for the size of the buffer. (step_insn_count): New member of BoardCfg. (step_insn_count_1_required): New member of BoardCfg. --------------000709080302030805010409 Content-Type: text/plain; name="sid-config.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sid-config.patch.txt" Content-length: 4337 Index: sid/main/dynamic/commonCfg.cxx =================================================================== RCS file: /cvs/src/src/sid/main/dynamic/commonCfg.cxx,v retrieving revision 1.11 diff -c -p -r1.11 commonCfg.cxx *** sid/main/dynamic/commonCfg.cxx 23 Aug 2005 21:09:48 -0000 1.11 --- sid/main/dynamic/commonCfg.cxx 11 May 2006 20:17:44 -0000 *************** sid::host_int_4 MemCfg::write_latency() *** 108,124 **** // CacheCfg CacheCfg::~CacheCfg () {} ! CacheCfg::CacheCfg (const string name) : ComponentCfg (name), AtomicCfg (name, "libcache.la", "cache_component_library", ! "hw-cache-buffer-8"), my_assoc (""), ! my_size (8), my_line_size (0), my_replace ("") ! {} // direct caches CacheCfg::CacheCfg (const string name, --- 108,126 ---- // CacheCfg CacheCfg::~CacheCfg () {} ! CacheCfg::CacheCfg (const string name, sid::host_int_4 size) : ComponentCfg (name), AtomicCfg (name, "libcache.la", "cache_component_library", ! ""), my_assoc (""), ! my_size (size), my_line_size (0), my_replace ("") ! { ! compute_comptype (); ! } // direct caches CacheCfg::CacheCfg (const string name, *************** void CacheCfg::compute_comptype () *** 161,167 **** { if (my_assoc == "") { ! my_comptype = "hw-cache-buffer-8"; } else { --- 163,169 ---- { if (my_assoc == "") { ! my_comptype = "hw-cache-buffer-" + sidutil::make_attribute (my_size); } else { *************** BoardCfg::BoardCfg (const string name, *** 1168,1178 **** core_probe (0), dynamic_configurator (NULL), start_config (""), ! warmup_funcs ("_Sid_config") { assert (sess); cpu = new CpuCfg ("cpu", default_cpu_variant, sess); - set_step_insn_count ("10000"); set_engine ("pbb"); main_mapper = new MapperCfg ("main-map"); assert (main_mapper); --- 1170,1181 ---- core_probe (0), dynamic_configurator (NULL), start_config (""), ! warmup_funcs ("_Sid_config"), ! step_insn_count ("10000"), ! step_insn_count_1_required_p (false) { assert (sess); cpu = new CpuCfg ("cpu", default_cpu_variant, sess); set_engine ("pbb"); main_mapper = new MapperCfg ("main-map"); assert (main_mapper); *************** void BoardCfg::write_load (Writer &w) *** 1266,1271 **** --- 1269,1276 ---- if (sess->verbose) set (loader, "verbose?", "true"); + set (cpu, "step-insn-count", step_insn_count_1_required_p ? "1" : step_insn_count); + AggregateCfg::write_load (w); } *************** void BoardCfg::set_engine (const string *** 1388,1394 **** void BoardCfg::set_step_insn_count (const string count) { assert (cpu); ! cpu->set (cpu, "step-insn-count", count); } void BoardCfg::set_endian (const string endian) --- 1393,1399 ---- void BoardCfg::set_step_insn_count (const string count) { assert (cpu); ! step_insn_count = count; } void BoardCfg::set_endian (const string endian) *************** void BoardCfg::trace_counter () *** 1455,1460 **** --- 1460,1466 ---- { assert (cpu); cpu->set (cpu, "trace-counter?", "true"); + step_insn_count_1_required_p = true; } void BoardCfg::trace_disassemble () Index: sid/main/dynamic/commonCfg.h =================================================================== RCS file: /cvs/src/src/sid/main/dynamic/commonCfg.h,v retrieving revision 1.9 diff -c -p -r1.9 commonCfg.h *** sid/main/dynamic/commonCfg.h 23 Aug 2005 21:09:48 -0000 1.9 --- sid/main/dynamic/commonCfg.h 11 May 2006 20:17:44 -0000 *************** class CacheCfg : *** 37,44 **** virtual public AtomicCfg { public: ! // 8-byte buffers ! CacheCfg (const string name); // direct caches CacheCfg (const string name, const sid::host_int_4 size, --- 37,44 ---- virtual public AtomicCfg { public: ! // n-byte buffers ! CacheCfg (const string name, sid::host_int_4 size = 8); // direct caches CacheCfg (const string name, const sid::host_int_4 size, *************** public: *** 408,413 **** --- 408,415 ---- string start_config; string warmup_funcs; string profile_funcs; + string step_insn_count; + bool step_insn_count_1_required_p; }; #endif // __commonCfg_h__ --------------000709080302030805010409--