109
edits
Joel Reymont (talk | contribs) |
Joel Reymont (talk | contribs) |
||
| Line 659: | Line 659: | ||
= DTrace tips and tricks = | = DTrace tips and tricks = | ||
=== Function entry/return vs static probes === | |||
Q: I added a couple of static probes to Firefox to measure actual work done. I could have used a pid$target probe with a function name but work is done within an if statement, which is where I placed the static probes. I'm wondering about my use, though. Is the following significantly more | |||
efficient than pid$target::FunName:entry and return? | |||
A: No, it's not significantly more efficient. Both function entry/return probes and USDT probes involve replacing an instruction in the stream with a trap instruction. The expense of the trap into the kernel is going to overwhelm any subtleties in handling between the two different types of probes. --Chad Mynhier | |||
=== Combining scripts === | === Combining scripts === | ||
edits