From: Prerna Saxena <prerna@linux.vnet.ibm.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Hajnoczi <stefanha@linux.vnet.ibm.com>,
kvm@vger.kernel.org, Kiszka <jan.kiszka@siemens.com>,
qemu-devel@nongnu.org, maneesh@linux.vnet.ibm.com,
ananth@linux.vnet.ibm.com, Stefan@us.ibm.com
Subject: Re: [Qemu-devel] [PATCH 2/3] Monitor command 'trace'
Date: Fri, 11 Jun 2010 16:16:44 +0530 [thread overview]
Message-ID: <4C121414.7040507@linux.vnet.ibm.com> (raw)
In-Reply-To: <20100609173753.359e081e@redhat.com>
Hi Luiz,
Thanks for your feedback.
On 06/10/2010 02:07 AM, Luiz Capitulino wrote:
> On Tue, 8 Jun 2010 12:34:37 +0530
> Prerna Saxena<prerna@linux.vnet.ibm.com> wrote:
>
>> This introduces the monitor command 'trace' to read current contents of
>> trace buffer.
>>
>> ...
>> diff --git a/simpletrace.c b/simpletrace.c
>> index 2fec4d3..8f33a81 100644
>> --- a/simpletrace.c
>> +++ b/simpletrace.c
>> @@ -62,3 +62,18 @@ void trace4(TraceEvent event, unsigned long x1, unsigned long x2, unsigned long
>> void trace5(TraceEvent event, unsigned long x1, unsigned long x2, unsigned long x3, unsigned long x4, unsigned long x5) {
>> trace(event, x1, x2, x3, x4, x5);
>> }
>> +
>> +void do_info_trace(Monitor *mon) {
>
> You sure this shouldn't be 'info trace'?
In this set, I had a direct monitor command 'trace' to display trace
buffer contents.
In v2, I have introduced an 'info trace' command to do the same, since
it intuitively made more sense to use an 'info' command to see state of
trace buffer. For this implementation, the present handler name makes
more sense.(do_info_trace())
>
>> + static unsigned int i, max_idx;
>
> Why static?
This isnt needed. The next patch in this series removed it (This change
should've been a part of this patch, but went into next)
Cleaned it up in v2.
>
>> +
>> + if (trace_idx)
>> + max_idx = trace_idx;
>> + else
>> + max_idx = TRACE_BUF_LEN;
>
> max_idx = trace_idx ? trace_idx : TRACE_BUF_LEN;
>
>> +
>> + for (i=0; i<max_idx ;i++)
>> + monitor_printf(mon, "Event %ld : %ld %ld %ld %ld %ld\n",
>> + trace_buf[i].event, trace_buf[i].x1, trace_buf[i].x2,
>> + trace_buf[i].x3, trace_buf[i].x4, trace_buf[i].x5);
>
> Style& indentation.
Changed in v2.
>
>> + return;
>
> Not needed.
Removed in v2.
>
>> +}
>> diff --git a/tracetool b/tracetool
>> ....
>
>
--
Prerna Saxena
Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India
next prev parent reply other threads:[~2010-06-11 10:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-08 6:58 [Qemu-devel] [PATCH 0/3] Monitor commands for 'simple' trace backend Prerna Saxena
2010-06-08 7:01 ` [Qemu-devel] [PATCH 1/3] export tdb_hash() Prerna Saxena
2010-06-09 20:35 ` Luiz Capitulino
2010-06-11 10:32 ` Prerna Saxena
2010-06-08 7:04 ` [Qemu-devel] [PATCH 2/3] Monitor command 'trace' Prerna Saxena
2010-06-09 20:37 ` Luiz Capitulino
2010-06-11 10:46 ` Prerna Saxena [this message]
2010-06-08 7:08 ` [Qemu-devel] [PATCH 3/3] Toggle tracepoint state Prerna Saxena
2010-06-09 20:43 ` Luiz Capitulino
2010-06-11 10:57 ` Prerna Saxena
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C121414.7040507@linux.vnet.ibm.com \
--to=prerna@linux.vnet.ibm.com \
--cc=Stefan@us.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=ananth@linux.vnet.ibm.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=lcapitulino@redhat.com \
--cc=maneesh@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).