From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2202 invoked by alias); 27 May 2002 20:11:10 -0000 Mailing-List: contact sid-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sources.redhat.com Received: (qmail 2194 invoked from network); 27 May 2002 20:11:09 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 27 May 2002 20:11:09 -0000 Received: from tooth.toronto.redhat.com (unknown [172.16.14.29]) by touchme.toronto.redhat.com (Postfix) with ESMTP id C17E2B8036 for ; Mon, 27 May 2002 16:11:08 -0400 (EDT) Received: (from bje@localhost) by tooth.toronto.redhat.com (8.11.6/8.11.6) id g4RKB8N30871; Mon, 27 May 2002 16:11:08 -0400 From: Ben Elliston MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15602.37596.528707.514034@tooth.toronto.redhat.com> Date: Mon, 27 May 2002 13:11:00 -0000 To: sid@sources.redhat.com Subject: hw-glue-probe-bus enhancement X-SW-Source: 2002-q2/txt/msg00022.txt.bz2 The following patch enhances the hw-glue-probe-bus component to allow an optional label to be given to each instance. This is helpful for distinguishing trace output when placing multiple probes around a complicated memory hierarchy. Okay to commit? 2002-05-27 Ben Elliston * glue.cxx (bus_prober::label): New member. (bus_prober ctor): Add a corresponding "label" attribute. (probing_bus::traceAccess): Output a component label, if given. * hw-glue-probe-bus.xml: Update documentation. Index: glue.cxx =================================================================== RCS file: /cvs/src/src/sid/component/glue/glue.cxx,v retrieving revision 1.6 diff -u -p -r1.6 glue.cxx --- glue.cxx 3 Aug 2001 06:02:44 -0000 1.6 +++ glue.cxx 27 May 2002 20:09:18 -0000 @@ -383,6 +383,7 @@ class bus_prober: public virtual compone output_pin accesstype_pin; host_int_4 sample_interval; // 0: disabled + string label; public: bus_prober::bus_prober (): @@ -407,6 +408,7 @@ public: add_attribute ("sample-interval", & this->sample_interval, "setting"); add_attribute ("trace?", & this->upstream.verbose_p, "setting"); + add_attribute ("label", & this->label, "setting"); add_attribute_ro ("interval-counter", & this->upstream.counter, "register"); // XXX: make watchable @@ -433,6 +435,9 @@ probing_bus::traceAccess(host_int_4 addr (s == bus::unmapped) ? " unmapped!" : (s == bus::unpermitted) ? " unpermitted!" : " (unknown)!"; + if (prober->label != "") + cout << prober->label << ": "; + cout << access_type1 << '-' << access_endian << '-' << access_size << ':' << make_numeric_attribute (addr, ios::hex | ios::showbase) << ' ' << access_type2 << ' ' Index: hw-glue-probe-bus.txt =================================================================== RCS file: /cvs/src/src/sid/component/glue/hw-glue-probe-bus.txt,v retrieving revision 1.3 diff -u -p -r1.3 hw-glue-probe-bus.txt --- hw-glue-probe-bus.txt 3 Aug 2001 01:30:18 -0000 1.3 +++ hw-glue-probe-bus.txt 27 May 2002 20:09:18 -0000 @@ -46,7 +46,8 @@ Functionality: | |One line per transaction is shown in a format resembling the common gdb | | |simulators' --trace-core output: | | | | -| |MODE:ADDRESS ARROW DATA [LATENCY] [STATUS] where MODE is an encoding of | +| |[LABEL:] MODE:ADDRESS ARROW DATA [LATENCY] [STATUS] where LABEL is an | +| |optional label identifying the probe component. MODE is an encoding of | | |the access type: zzz where le and be represent little- or | | |big-endianness, and 1-8 represent the number of bytes transferred. ARROW| | |is a redundant encoding of direction: {->,<-} for {read,write} ADDRESS | @@ -181,6 +182,10 @@ Component Reference: |----------------+--------+-------+-------+---------|| | | | | |bus || |type |pin |numeric|- |traffic || + | | | | |sampling || + |----------------+--------+-------+-------+---------|| + | | |any | |bus || + |label |setting |string |- |traffic || | | | | |sampling || +----------------------------------------------------+ Index: hw-glue-probe-bus.xml =================================================================== RCS file: /cvs/src/src/sid/component/glue/hw-glue-probe-bus.xml,v retrieving revision 1.1 diff -u -p -r1.1 hw-glue-probe-bus.xml --- hw-glue-probe-bus.xml 3 Aug 2001 01:47:52 -0000 1.1 +++ hw-glue-probe-bus.xml 27 May 2002 20:09:18 -0000 @@ -26,6 +26,7 @@ +

@@ -82,8 +83,9 @@ One line per transaction is shown in a format resembling the common gdb simulators' --trace-core output:

- MODE:ADDRESS ARROW DATA [LATENCY] [STATUS] + [LABEL:] MODE:ADDRESS ARROW DATA [LATENCY] [STATUS] where + LABEL is an optional label identifying the probe component. MODE is an encoding of the access type: zzz where le and be represent little- or big-endianness,