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 [email protected]
