All of lore.kernel.org
 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

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