public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug uprobes/13404] New: DTRACE_PROBE for more that 10 arguments needed
@ 2011-11-11 14:22 aschultz at tpip dot net
  2011-11-11 14:36 ` [Bug uprobes/13404] " mjw at redhat dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: aschultz at tpip dot net @ 2011-11-11 14:22 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13404

             Bug #: 13404
           Summary: DTRACE_PROBE for more that 10 arguments needed
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: uprobes
        AssignedTo: systemtap@sourceware.org
        ReportedBy: aschultz@tpip.net
    Classification: Unclassified


The DTRACE wrapper macro needs to support more that 10 arguments. It seems that
the Solaris version does have at least DTRACE_PROBE11 and possibly more.

The same wrappers should be provided by systemtap.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug uprobes/13404] DTRACE_PROBE for more that 10 arguments needed
  2011-11-11 14:22 [Bug uprobes/13404] New: DTRACE_PROBE for more that 10 arguments needed aschultz at tpip dot net
@ 2011-11-11 14:36 ` mjw at redhat dot com
  2011-11-11 14:48 ` aschultz at tpip dot net
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mjw at redhat dot com @ 2011-11-11 14:36 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13404

Mark Wielaard <mjw at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mjw at redhat dot com

--- Comment #1 from Mark Wielaard <mjw at redhat dot com> 2011-11-11 14:35:57 UTC ---
yeah, we should be compatible whenever possible.
Do you have some pointers or example programs that use these new macros?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug uprobes/13404] DTRACE_PROBE for more that 10 arguments needed
  2011-11-11 14:22 [Bug uprobes/13404] New: DTRACE_PROBE for more that 10 arguments needed aschultz at tpip dot net
  2011-11-11 14:36 ` [Bug uprobes/13404] " mjw at redhat dot com
@ 2011-11-11 14:48 ` aschultz at tpip dot net
  2011-11-11 15:01 ` aschultz at tpip dot net
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aschultz at tpip dot net @ 2011-11-11 14:48 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13404

--- Comment #2 from Andreas Schultz <aschultz at tpip dot net> 2011-11-11 14:48:28 UTC ---
The only sample I have is the experimental DTRACE support for Erlang:
https://github.com/slfritchie/otp/compare/9a064a8c4f33d091c424bd23713bf76cd0ac7826...dtrace-review1

AFAIK this have been tested on Solaris and OSX.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug uprobes/13404] DTRACE_PROBE for more that 10 arguments needed
  2011-11-11 14:22 [Bug uprobes/13404] New: DTRACE_PROBE for more that 10 arguments needed aschultz at tpip dot net
  2011-11-11 14:36 ` [Bug uprobes/13404] " mjw at redhat dot com
  2011-11-11 14:48 ` aschultz at tpip dot net
@ 2011-11-11 15:01 ` aschultz at tpip dot net
  2011-11-11 15:04 ` mjw at redhat dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aschultz at tpip dot net @ 2011-11-11 15:01 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13404

--- Comment #3 from Andreas Schultz <aschultz at tpip dot net> 2011-11-11 15:00:51 UTC ---
The actual offender is this probe:

    probe efile_drv__entry(int, int, char *, int, char *, char *,
                           int64_t, int64_t, int64_t, int64_t, char *);

'dtrace -h -C -Ibeam -s' then compiles that to
#define
erlang_efile_drv_entry(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11)
\
STAP_PROBE11(erlang,efile_drv__entry,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11)

So it is not actually a missing DTRACE macro, but the generated code refers
to macro a that does not exists. Using the STAP_PROBEV instead is also not
going to help as it is basically only a convenience wrapper around the
STAP_PROBEx macros.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug uprobes/13404] DTRACE_PROBE for more that 10 arguments needed
  2011-11-11 14:22 [Bug uprobes/13404] New: DTRACE_PROBE for more that 10 arguments needed aschultz at tpip dot net
                   ` (2 preceding siblings ...)
  2011-11-11 15:01 ` aschultz at tpip dot net
@ 2011-11-11 15:04 ` mjw at redhat dot com
  2011-11-11 15:09 ` fche at redhat dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mjw at redhat dot com @ 2011-11-11 15:04 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13404

--- Comment #4 from Mark Wielaard <mjw at redhat dot com> 2011-11-11 15:04:19 UTC ---
I see a DTRACE11 define in erts/emulator/beam/dtrace-wrapper.h

#define DTRACE11(name, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \
    erlang_##name((a0), (a1), (a2), (a3), (a4), (a5), (a6), (a7), (a8), (a9),
(a10))

Which is used in erts/emulator/drivers/common/efile_drv.c

            DTRACE11(efile_drv_entry, dt_priv->thread_num, dt_priv->tag++,
                     dt_utag, FILE_LSEEK,
                     NULL, NULL, dt_i1, dt_i2, dt_i3, 0, desc->port_str);

And then erts/emulator/beam/erlang_dtrace.d defines an erlang provider with:

    probe efile_drv__entry(int, int, char *, int, char *, char *,
                           int64_t, int64_t, int64_t, int64_t, char *);

I haven't tried to build it with systemtap-sdt installed to see how we expand
that. If someone has, it would be nice to figure out what it all expands to. I
assume indeed some DTRACE_PROBE11 macro will be generated.

If so, this should be easy. It only goes up to 11 here, but we could just
define some more just in case.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug uprobes/13404] DTRACE_PROBE for more that 10 arguments needed
  2011-11-11 14:22 [Bug uprobes/13404] New: DTRACE_PROBE for more that 10 arguments needed aschultz at tpip dot net
                   ` (3 preceding siblings ...)
  2011-11-11 15:04 ` mjw at redhat dot com
@ 2011-11-11 15:09 ` fche at redhat dot com
  2011-11-11 17:40 ` jistone at redhat dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: fche at redhat dot com @ 2011-11-11 15:09 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13404

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fche at redhat dot com

--- Comment #5 from Frank Ch. Eigler <fche at redhat dot com> 2011-11-11 15:08:56 UTC ---
Systemtap simply must go to 11.
Or more.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug uprobes/13404] DTRACE_PROBE for more that 10 arguments needed
  2011-11-11 14:22 [Bug uprobes/13404] New: DTRACE_PROBE for more that 10 arguments needed aschultz at tpip dot net
                   ` (4 preceding siblings ...)
  2011-11-11 15:09 ` fche at redhat dot com
@ 2011-11-11 17:40 ` jistone at redhat dot com
  2011-11-12 22:12 ` mjw at redhat dot com
  2011-11-12 22:13 ` mjw at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: jistone at redhat dot com @ 2011-11-11 17:40 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13404

Josh Stone <jistone at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jistone at redhat dot com

--- Comment #6 from Josh Stone <jistone at redhat dot com> 2011-11-11 17:39:45 UTC ---
The only limit that I think we're close on is with -pedantic warnings on asm
string length, bug #12137.  It's noted that ppc already fails that test on the
9 and 10 arg case.  Even x86 is still close, where I think one more arg might
be ok, but two will push it over the edge.

We can write that off though -- if you need so many args, you can't use
-pedantic, sorry.  I'm not sure what the next practical limit is, maybe macro
args at 127.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug uprobes/13404] DTRACE_PROBE for more that 10 arguments needed
  2011-11-11 14:22 [Bug uprobes/13404] New: DTRACE_PROBE for more that 10 arguments needed aschultz at tpip dot net
                   ` (5 preceding siblings ...)
  2011-11-11 17:40 ` jistone at redhat dot com
@ 2011-11-12 22:12 ` mjw at redhat dot com
  2011-11-12 22:13 ` mjw at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: mjw at redhat dot com @ 2011-11-12 22:12 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13404

Mark Wielaard <mjw at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #8 from Mark Wielaard <mjw at redhat dot com> 2011-11-12 22:11:56 UTC ---
Fixed as said in previous comment.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug uprobes/13404] DTRACE_PROBE for more that 10 arguments needed
  2011-11-11 14:22 [Bug uprobes/13404] New: DTRACE_PROBE for more that 10 arguments needed aschultz at tpip dot net
                   ` (6 preceding siblings ...)
  2011-11-12 22:12 ` mjw at redhat dot com
@ 2011-11-12 22:13 ` mjw at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: mjw at redhat dot com @ 2011-11-12 22:13 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13404

--- Comment #7 from Mark Wielaard <mjw at redhat dot com> 2011-11-12 22:11:14 UTC ---
Josh fixed this:

commit 88e39987df7109b26343c9c33567646873d6f829
Author: Josh Stone <jistone@redhat.com>
Date:   Fri Nov 11 11:11:11 2011 -1100

    PR13404: Dial SDT args up to twelve

    This is SystëmTap, and eleven is so 1984...

    * includes/sys/sdt.h: Expand all macros from 10 to 12.
    * tapsets.cxx (sdt_uprobe_var_expanding_visitor): Allow 12 args now.
    * testsuite/systemtap.base/sdt.*: Test 12 args for SDT v3 only.
    * testsuite/systemtap.base/sdt_va_args.*: Test 12 in STAP_PROBEV.

If you could test this against the Erlang DTRACE support that would be great.
If you don't want to build a new systemtap you should be able to just replace
sys/sdt.h with the latest one from git:
http://sourceware.org/git/?p=systemtap.git;a=blob_plain;f=includes/sys/sdt.h;hb=HEAD

Please do reopen or file a new bug if there is still a problem.

BTW. 11 arguments is really a lot of information for one probe. Maybe you could
look into more splitting some of them up into more fine grained probes (for
example specific ones for each command in this case).

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

end of thread, other threads:[~2011-11-12 22:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-11 14:22 [Bug uprobes/13404] New: DTRACE_PROBE for more that 10 arguments needed aschultz at tpip dot net
2011-11-11 14:36 ` [Bug uprobes/13404] " mjw at redhat dot com
2011-11-11 14:48 ` aschultz at tpip dot net
2011-11-11 15:01 ` aschultz at tpip dot net
2011-11-11 15:04 ` mjw at redhat dot com
2011-11-11 15:09 ` fche at redhat dot com
2011-11-11 17:40 ` jistone at redhat dot com
2011-11-12 22:12 ` mjw at redhat dot com
2011-11-12 22:13 ` mjw at redhat dot com

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 read-only IMAP folder(s) and NNTP newsgroup(s).