qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Build failure with trace-backend=ust
@ 2011-11-14  8:03 Harsh Bora
  2011-11-14 14:57 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Harsh Bora @ 2011-11-14  8:03 UTC (permalink / raw)
  To: qemu-devel, Aneesh Kumar K. V, Stefan Hajnoczi

Hi,
I tried to explore LTTng UST with Qemu and built ust 0.15 (with urcu 
0.16 as reqd) and observed that Qemu gives compilation errors when built 
for trace-backend = ust. See this:

[harsh@harshbora v9fs]$ ./configure '--target-list=x86_64-softmmu' 
'--enable-debug' '--enable-kvm' --enable-trace-backend=ust
[harsh@harshbora v9fs]$ make
   GEN   x86_64-softmmu/config-devices.mak
   GEN   config-all-devices.mak
   GEN   qemu-options.texi

[.. snip ..]

   CC    qemu-option.o
   CC    cutils.o
   CC    osdep.o
In file included from osdep.c:49:
trace.h: In function ‘__trace_ust_slavio_misc_update_irq_raise’:
trace.h:277: error: ‘void’ must be the only parameter
trace.h:277: error: expected expression before ‘)’ token
trace.h:277: error: too many arguments to function ‘(void (*)(void 
*))__tp_it_func’
trace.h: At top level:
trace.h:277: error: ‘void’ must be the only parameter
trace.h:277: error: ‘void’ must be the only parameter
In file included from osdep.c:49:
trace.h: In function ‘__trace_ust_slavio_misc_update_irq_lower’:
trace.h:280: error: ‘void’ must be the only parameter
trace.h:280: error: expected expression before ‘)’ token
trace.h:280: error: too many arguments to function ‘(void (*)(void 
*))__tp_it_func’
trace.h: At top level:
trace.h:280: error: ‘void’ must be the only parameter
trace.h:280: error: ‘void’ must be the only parameter
In file included from osdep.c:49:
trace.h: In function ‘__trace_ust_slavio_timer_mem_writel_counter_invalid’:
trace.h:352: error: ‘void’ must be the only parameter
trace.h:352: error: expected expression before ‘)’ token
trace.h:352: error: too many arguments to function ‘(void (*)(void 
*))__tp_it_func’

[.. snip ..]

It appears that all trace-events with void parameter and a descriptive 
format string (in trace-events file) are thrown back with error. I 
explored LTTng's ust code and found that it also has a 
_DECLARE_TRACEPOINT_NOARGS to be used with events with no args (void 
arg). I see that in qemu we only use DECLARE_TRACE as in commit 
7e24e92a0615ee6be036743f2a035554d2ceac56. See below:

+linetoh_ust()
+{
+    local name args argnames
+    name=$(get_name "$1")
+    args=$(get_args "$1")
+    argnames=$(get_argnames "$1")
+
+    cat <<EOF
+DECLARE_TRACE(ust_$name, TPPROTO($args), TPARGS($argnames));
+#define trace_$name trace_ust_$name
+EOF

Do we need to put a check on args and if its void, use 
_DECLARE_TRACEPOINT_NOARGS instead ? Please enlighten.

regards,
Harsh

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] Build failure with trace-backend=ust
  2011-11-14  8:03 [Qemu-devel] Build failure with trace-backend=ust Harsh Bora
@ 2011-11-14 14:57 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2011-11-14 14:57 UTC (permalink / raw)
  To: Harsh Bora; +Cc: qemu-devel, Aneesh Kumar K. V

On Mon, Nov 14, 2011 at 8:03 AM, Harsh Bora <harsh@linux.vnet.ibm.com> wrote:
> I tried to explore LTTng UST with Qemu and built ust 0.15 (with urcu 0.16 as
> reqd) and observed that Qemu gives compilation errors when built for
> trace-backend = ust. See this:

Hi Harsh,
UST is not a stable library interface.  It has not settled down yet,
there are discussions about the library API on the project's mailing
list.

Therefore I'm not actively worrying about keeping it working.  If you
wish to send patches, please consider using <ust/version.h> to
identify the version of the library you are adding support for with
appropriate #ifdefs.

Hopefully they will settle on a stable API soon and we can commit
permanently working patches to QEMU.

I also encourage you to keep in touch with the upstream community
because they are active and friendly.  Perhaps they can help you get
it working.

Stefan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-14 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-14  8:03 [Qemu-devel] Build failure with trace-backend=ust Harsh Bora
2011-11-14 14:57 ` Stefan Hajnoczi

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).