On Mon, Aug 10, 2009 at 12:22:12AM -0700, Manfred M?cke wrote: > > If dtrace thinks something fishy is going on, it can refuse to instrument > > the return sites. This is mainly due to issues with jump-tables. > > If you set DTRACE_DEBUG= in your environment, is there anything of interest? > > Look for "grabbed pid NNNN" as a starting place. > > Thanks for the hint, I was not aware of DTRACE_DEBUG. I found the following, > which confirms your assumption, that it might be an issue with jump-tables: > > libdtrace DEBUG: creating probe pid17864:myprog:dcntrl_:return > libdtrace DEBUG: error at 0x851 (assuming jump table) > > I searched the forum but haven't found an explanation under what > conditions dtrace assumes a jump-table. Are there any (Fortran) > compiler settings which could help avoiding this issue?
That error is from usr/src/lib/libdtrace/i386/dt_isadep.c: 78 dt_pid_has_jump_table(struct ps_prochandle *P, dtrace_hdl_t *dtp, 79 uint8_t *text, fasttrap_probe_spec_t *ftp, const GElf_Sym *symp) 80 { ... 91 for (i = 0; i < ftp->ftps_size; i += size) { 92 size = dt_instr_size(&text[i], dtp, pid, symp->st_value + i, 93 dmodel); 95 /* 96 * Assume the worst if we hit an illegal instruction. 97 */ 98 if (size <= 0) { 99 dt_dprintf("error at %#lx (assuming jump table)\n", i); 100 return (1); 101 } ... 115 } 116 117 return (0); 118 } This means that there is some instruction in the stream that dtrace's disassembler is either getting the size wrong on (causing us to get out of alignment, causing us at a later point to fail on a bad instruction), or we're hitting an instruction we don't understand. Could you send me the output of: "echo dcntrl_::dis | mdb ./myprog" which uses the same disassembler. Cheers, - jonathan > In what context should I read the given address 0x851? Neither the > function dcntrl_ nor the calling function has an opcode starting at > this address. It's an offset _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org