All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Namhyung Kim <namhyung.kim@lge.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH 2/4] KVM: Use __print_hex() for kvm_emulate_insn tracepoint
Date: Wed, 27 Jun 2012 15:54:32 +0300	[thread overview]
Message-ID: <4FEB0288.5080106@redhat.com> (raw)
In-Reply-To: <1340801375.16702.10.camel@gandalf.stny.rr.com>

On 06/27/2012 03:49 PM, Steven Rostedt wrote:
> [ Added Avi]
> 
> On Wed, 2012-06-27 at 09:41 +0900, Namhyung Kim wrote:
>> From: Namhyung Kim <namhyung.kim@lge.com>
>> 
>> The kvm_emulate_insn tracepoint used __print_insn()
>> for printing its instructions. However it makes the
>> format of the event hard to parse as it reveals TP
>> internals.
>> 
>> Fortunately, kernel provides __print_hex for almost
>> same purpose, we can use it instead of open coding
>> it. The user-space can be changed to parse it later.
>> 
>> That means raw kernel tracing will not be affected
>> by this change:
>> 
>>  # cd /sys/kernel/debug/tracing/
>>  # cat events/kvm/kvm_emulate_insn/format
>>  name: kvm_emulate_insn
>>  ID: 29
>>  format:
>> 	...
>>  print fmt: "%x:%llx:%s (%s)%s", REC->csbase, REC->rip, __print_hex(REC->insn, REC->len), \
>>  __print_symbolic(REC->flags, { 0, "real" }, { (1 << 0) | (1 << 1), "vm16" }, \
>>  { (1 << 0), "prot16" }, { (1 << 0) | (1 << 2), "prot32" }, { (1 << 0) | (1 << 3), "prot64" }), \
>>  REC->failed ? " failed" : ""
>> 
>>  # echo 1 > events/kvm/kvm_emulate_insn/enable
>>  # cat trace
>>  # tracer: nop
>>  #
>>  # entries-in-buffer/entries-written: 2183/2183   #P:12
>>  #
>>  #                              _-----=> irqs-off
>>  #                             / _----=> need-resched
>>  #                            | / _---=> hardirq/softirq
>>  #                            || / _--=> preempt-depth
>>  #                            ||| /     delay
>>  #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
>>  #              | |       |   ||||       |         |
>>          qemu-kvm-1782  [002] ...1   140.931636: kvm_emulate_insn: 0:c102fa25:89 10 (prot32)
>>          qemu-kvm-1781  [004] ...1   140.931637: kvm_emulate_insn: 0:c102fa25:89 10 (prot32)
> 
> Avi, can you give your Acked-by for this change?

Acked-by: Avi Kivity <avi@redhat.com>

Some time ago we discussed moving the trace-cmd plugins to /lib/modules,
which would make this trace display as "mov %edx,(%eax)" instead of "89
10", even for non-trace-cmd users.  Was there any movement on this?

-- 
error compiling committee.c: too many arguments to function



  reply	other threads:[~2012-06-27 12:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27  0:41 [PATCH RESEND 1/4] tools lib traceevent: Check string is really printable Namhyung Kim
2012-06-27  0:41 ` [PATCH 2/4] KVM: Use __print_hex() for kvm_emulate_insn tracepoint Namhyung Kim
2012-06-27 12:49   ` Steven Rostedt
2012-06-27 12:54     ` Avi Kivity [this message]
2012-06-27 13:20       ` Steven Rostedt
2012-06-28  1:16         ` Namhyung Kim
2012-06-28  1:52           ` Steven Rostedt
2012-06-28  1:59             ` Namhyung Kim
2012-06-28  2:18               ` Steven Rostedt
2012-07-06 10:47   ` [tip:perf/core] tracing/kvm: " tip-bot for Namhyung Kim
2012-06-27  0:41 ` [PATCH 3/4] tools lib traceevent: Use local variable 'field' Namhyung Kim
2012-06-28 16:22   ` Arnaldo Carvalho de Melo
2012-07-06 10:54   ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-06-27  0:41 ` [PATCH 4/4] tools lib traceevent: Add support for __print_hex() Namhyung Kim
2012-06-28 16:22   ` Arnaldo Carvalho de Melo
2012-07-06 10:55   ` [tip:perf/core] tools lib traceevent: Add support for __print_hex( ) tip-bot for Namhyung Kim

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=4FEB0288.5080106@redhat.com \
    --to=avi@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=fweisbec@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    --subject='Re: [PATCH 2/4] KVM: Use __print_hex() for kvm_emulate_insn tracepoint' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.