From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baKcY-0006bK-Dg for qemu-devel@nongnu.org; Thu, 18 Aug 2016 06:32:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1baKcV-0000xC-8W for qemu-devel@nongnu.org; Thu, 18 Aug 2016 06:32:22 -0400 Received: from roura.ac.upc.es ([147.83.33.10]:54474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baKcU-0000wY-S6 for qemu-devel@nongnu.org; Thu, 18 Aug 2016 06:32:19 -0400 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <147041636348.2523.2954972609232949598.stgit@fimbulvetr.bsc.es> <147041637432.2523.7105228834091669652.stgit@fimbulvetr.bsc.es> <20160818095945.GB4850@stefanha-x1.localdomain> Date: Thu, 18 Aug 2016 12:32:14 +0200 In-Reply-To: <20160818095945.GB4850@stefanha-x1.localdomain> (Stefan Hajnoczi's message of "Thu, 18 Aug 2016 10:59:45 +0100") Message-ID: <87k2feqsep.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/6] hypertrace: Add tracing event "guest_hypertrace" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, Stefan Hajnoczi Stefan Hajnoczi writes: > On Fri, Aug 05, 2016 at 06:59:34PM +0200, Llu=C3=ADs Vilanova wrote: >> +# hypertrace >> +hyperargs=3D$hypertrace >> +if test $hypertrace =3D "disabled"; then >> + hyperargs=3D0 >> +fi >> +echo "CONFIG_HYPERTRACE_ARGS=3D$hyperargs" >> $config_host_mak >> +hypertrace_events=3Dhypertrace/trace-events >> +mkdir -p $(dirname $hypertrace_events) >> +echo "# See docs/trace-events.txt for syntax documentation." >$hypertra= ce_events >> +echo -n 'vcpu guest_hypertrace(' >>$hypertrace_events >> +for i in `seq $hypertrace`; do >> + if test $i !=3D 1; then >> + echo -n ", " >>$hypertrace_events >> + fi >> + echo -n "uint64_t arg$i" >>$hypertrace_events >> +done >> +echo -n ') ' >>$hypertrace_events >> +for i in `seq $hypertrace`; do >> + echo -n "\" arg$i=3D0x%016\"PRIx64" >>$hypertrace_events >> +done >> +echo >>$hypertrace_events > This reminds me of the first versions of "simpletrace" where the number > of arguments was fixed and argument size was fixed. > This meant strings cannot be traced, number of arguments is limited, and > you pay an space overhead for unused arguments. > Later on the format was changed to header (including .length field) and > binary data payload. This reduced the space overhead, elminated the > argument count limit, and allowed strings to be traced. > I think these are desirable qualities for any tracing mechanism and > would reconsider a fixed number of uint64_t arguments. The number of arguments is fixed at *compilation time*. What is not support= ed out of the box is multiplexing multiple guest events over the hypertrace event. That is, you need to do it yourself when post-processing the traces,= but I don't think that's too bad. Cheers, Lluis