All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harsh Bora <harsh@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org,
	"Aneesh Kumar K. V" <aneesh.kumar@linux.vnet.ibm.com>,
	Stefan Hajnoczi <stefanha@gmail.com>
Subject: [Qemu-devel] Build failure with trace-backend=ust
Date: Mon, 14 Nov 2011 13:33:47 +0530	[thread overview]
Message-ID: <4EC0CB63.30805@linux.vnet.ibm.com> (raw)

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

             reply	other threads:[~2011-11-14  8:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14  8:03 Harsh Bora [this message]
2011-11-14 14:57 ` [Qemu-devel] Build failure with trace-backend=ust Stefan Hajnoczi

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=4EC0CB63.30805@linux.vnet.ibm.com \
    --to=harsh@linux.vnet.ibm.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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 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.