Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: Paolo Bonzini via lttng-dev <lttng-dev@lists.lttng.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Sean Christopherson <seanjc@google.com>
Cc: lttng-dev <lttng-dev@lists.lttng.org>,
	rostedt <rostedt@goodmis.org>,
	kvm@vger.kernel.org
Subject: Re: [lttng-dev] Unexport of kvm_x86_ops vs tracer modules
Date: Fri, 8 Apr 2022 18:24:05 +0200	[thread overview]
Message-ID: <3c11308e-006a-a7e9-8482-c6b341690530@redhat.com> (raw)
In-Reply-To: <1218866473.10909.1649432186473.JavaMail.zimbra@efficios.com>

On 4/8/22 17:36, Mathieu Desnoyers wrote:
> LTTng is an out of tree kernel module, which currently relies on the export.
> Indeed, arch/x86/kvm/x86.c exports a set of tracepoints to kernel modules, e.g.:
> 
> EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_entry)
> 
> But any probe implementation hooking on that tracepoint would need kvm_x86_ops
> to translate the struct kvm_vcpu * into meaningful tracing data.
> 
> I could work-around this on my side in ugly ways, but I would like to discuss
> how kernel module tracers are expected to implement kvm events probes without
> the kvm_x86_ops symbol ?

The conversion is done in the TP_fast_assign snippets, which are part of 
kvm.ko and therefore do not need the export.  As I understand it, the 
issue is that LTTng cannot use the TP_fast_assign snippets, because they 
are embedded in the trace_event_raw_event_* symbols?

We cannot do the extraction before calling trace_kvm_exit, because it's 
expensive.

Paolo

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

  reply	other threads:[~2022-04-08 16:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08 15:36 Mathieu Desnoyers via lttng-dev
2022-04-08 16:24 ` Paolo Bonzini via lttng-dev [this message]
2022-04-08 18:06   ` Mathieu Desnoyers via lttng-dev
2022-04-25 13:00     ` Mathieu Desnoyers via lttng-dev
2022-04-25 13:28       ` Paolo Bonzini via lttng-dev
2022-04-25 14:04     ` Steven Rostedt via lttng-dev
2022-04-25 16:02       ` Mathieu Desnoyers via lttng-dev
2022-04-25 19:13         ` Steven Rostedt via lttng-dev
2022-04-26  6:36         ` Paolo Bonzini via lttng-dev

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=3c11308e-006a-a7e9-8482-c6b341690530@redhat.com \
    --to=lttng-dev@lists.lttng.org \
    --cc=kvm@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=pbonzini@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=seanjc@google.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