Cyril Plisko
2008-Aug-06 20:00 UTC
[dtrace-discuss] USDT probes and really long function names (>128 chars)
Hi ! while working with customer on TNF to DTrace conversion I hit an interesting problem: It appears that if USDT probe is placed in the function with long name (more than 128 chars) dtrace -G chops the names to 128 chars in the resulting objects. The linker then fails to link the executable (quite expectedly). For C application I''d say someone who uses function names that long just deserves that. However, with C++ the mangling easily can grow the function name to be quite long. Here is how it looks: hellride:/export/dev/dte> make CCC=/opt/SUNWspro.12/bin/CC /opt/SUNWspro.12/bin/CC -m64 -g -c dtea.cc dtrace -C -G -64 -s dte_probes.d dtea.o /opt/SUNWspro.12/bin/CC -m64 -o dte dtea.o dte_probes.o Undefined first referenced symbol in file __1cMprocess_data6FpkCLnZsomewhat_long_class_name1_nZsomewhat_long_class_name2_nZsomewhat_long_class_name3_nZsomewhat_long_clas dte_probes.o ld: fatal: Symbol referencing errors. No output written to dte *** Error code 1 make: Fatal error: Command failed for target `dte'' Is there any easy workaround ? I mean beyond finding[1] the offending definition and recompiling libdtrace with larger buffer. Shouldn''t dtrace employ same logic linker uses to process object files ? [1] Is it this place ? http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libdtrace/common/dt_parser.h#172 -- Regards, Cyril
Adam Leventhal
2008-Aug-06 23:37 UTC
[dtrace-discuss] USDT probes and really long function names (>128 chars)
Hi Cyril, Unfortunately, there''s no simple work around other than hacking it up to incur a shorter function name. Please file a bug and we''ll try to get that resolved. Adam On Wed, Aug 06, 2008 at 11:00:11PM +0300, Cyril Plisko wrote:> Hi ! > > while working with customer on TNF to DTrace conversion I hit an > interesting problem: > > It appears that if USDT probe is placed in the function with long name > (more than 128 chars) dtrace -G chops the names to 128 chars in the > resulting objects. The linker then fails to link the executable (quite > expectedly). > For C application I''d say someone who uses function names that long > just deserves that. However, with C++ the mangling easily can grow the > function name to be quite long. > > Here is how it looks: > > hellride:/export/dev/dte> make CCC=/opt/SUNWspro.12/bin/CC > /opt/SUNWspro.12/bin/CC -m64 -g -c dtea.cc > dtrace -C -G -64 -s dte_probes.d dtea.o > /opt/SUNWspro.12/bin/CC -m64 -o dte dtea.o dte_probes.o > Undefined first referenced > symbol in file > __1cMprocess_data6FpkCLnZsomewhat_long_class_name1_nZsomewhat_long_class_name2_nZsomewhat_long_class_name3_nZsomewhat_long_clas > dte_probes.o > ld: fatal: Symbol referencing errors. No output written to dte > *** Error code 1 > make: Fatal error: Command failed for target `dte'' > > > Is there any easy workaround ? I mean beyond finding[1] the offending > definition and recompiling libdtrace with larger buffer. > Shouldn''t dtrace employ same logic linker uses to process object files ? > > [1] Is it this place ? > http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libdtrace/common/dt_parser.h#172 > > > -- > Regards, > Cyril > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Fishworks http://blogs.sun.com/ahl
Michael Stevenson
2009-Feb-23 17:56 UTC
[dtrace-discuss] USDT probes and really long function names (>128 chars)
Hi Adam, Do you know if there has been any progress on this? I don''t see a bug to reference to track it down .. Thanks. Michael -- This message posted from opensolaris.org
Adam Leventhal
2009-Feb-23 22:42 UTC
[dtrace-discuss] USDT probes and really long function names (>128 chars)
> Do you know if there has been any progress on this? I don''t see a > bug to reference to track it down ..Hey Michael, I don''t see a bug on this either. Would you mind filing it so that it doesn''t fall off my radar again? Thanks. Adam -- Adam Leventhal, Fishworks http://blogs.sun.com/ahl
David Lutz
2009-Feb-24 16:45 UTC
[dtrace-discuss] USDT probes and really long function names (>128 chars)
Adam, I think this is CR# 6258412 "DTrace needs to support longer function names." BTW, we ran into this recently when adding probes to MySQL, so it would be great to get this fixed. Thanks, David ----- Original Message ----- From: Adam Leventhal <ahl at eng.sun.com> Date: Monday, February 23, 2009 2:45 pm> >Do you know if there has been any progress on this? I don''t see a > bug to reference to track it down .. > > > Hey Michael, > > I don''t see a bug on this either. Would you mind filing it so that it > doesn''t fall off my radar again? Thanks. > > Adam > > -- > Adam Leventhal, Fishworks http://blogs.sun.com/ahl >
Adam Leventhal
2009-Feb-24 17:20 UTC
[dtrace-discuss] USDT probes and really long function names (>128 chars)
Hey David, Thanks for finding that. I''m moving the bug into the accepted state so it should show up externally in a little while. Adam On Tue, Feb 24, 2009 at 08:45:46AM -0800, David Lutz wrote:> Adam, > > I think this is CR# 6258412 "DTrace needs to support longer function > names." BTW, we ran into this recently when adding probes to MySQL, > so it would be great to get this fixed. > > Thanks, > David > > ----- Original Message ----- > From: Adam Leventhal <ahl at eng.sun.com> > Date: Monday, February 23, 2009 2:45 pm > > > >Do you know if there has been any progress on this? I don''t see a > > bug to reference to track it down .. > > > > > > Hey Michael, > > > > I don''t see a bug on this either. Would you mind filing it so that it > > doesn''t fall off my radar again? Thanks. > > > > Adam > > > > -- > > Adam Leventhal, Fishworks http://blogs.sun.com/ahl > > >-- Adam Leventhal, Fishworks http://blogs.sun.com/ahl