I just got the following nastygram: dtrace: failed to enable ''probes.tmp'': DIF program exceeds maximum program size Is this talking about my entire program or just a particular action? Also, is there a way (e.g., DTrace option) that I can use to override this limit? -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm at cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development
On Sat, Dec 01, 2007 at 09:17:43AM -0800, Rich Morin wrote:> I just got the following nastygram: > > dtrace: failed to enable ''probes.tmp'': > DIF program exceeds maximum program sizeYeah, I figured you might run into this limitation. There is a DOF size limitation that most normal DTrace users don''t run into, but most people automatically generating (massive) scripts ultimately do. This is discussed in our "Advanced DTrace: Tips, Tricks and Gotchas" presentation: http://blogs.sun.com/roller/resources/bmc/dtrace_tips.pdf This "gotcha" is discussed on slide 14. The executive summary is that you need to tune dtrace_dof_maxsize up from its default of 256k. In Solaris, this is done statically via /etc/system or dynamically via mdb -- but I don''t know how kernel variables are tuned in MacOS. Apple folks? (And yes, the "Advanced DTrace" presentation now really should be wiki-ized.) - Bryan -------------------------------------------------------------------------- Bryan Cantrill, Sun Microsystems FishWorks. http://blogs.sun.com/bmc
At 11:30 -0800 12/1/07, Bryan Cantrill wrote:> ... I don''t know how kernel variables are tuned in MacOS.Mac OS X 10.5 has neither an /etc/system file nor an mdb command. Although a bit of Googling turned up this hint: http://www.commandlinemac.com/article.php?story=20071029182310790 Running "sysctl -a" does not list any variables that have the string "dtrace" in them. Suggestions, anyone? -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm at cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development
On Sat, Dec 01, 2007 at 01:50:27PM -0800, Rich Morin wrote:> At 11:30 -0800 12/1/07, Bryan Cantrill wrote: > > ... I don''t know how kernel variables are tuned in MacOS. > > Mac OS X 10.5 has neither an /etc/system file nor an mdb > command. Although a bit of Googling turned up this hint: > > http://www.commandlinemac.com/article.php?story=20071029182310790 > > Running "sysctl -a" does not list any variables that have > the string "dtrace" in them. Suggestions, anyone?Another possibility is to find the dtrace(7D) binary on disk, and patch the value in the binary itself (assuming that MacOS has tools for such patching -- in Solaris, we would again use mdb). - Bryan -------------------------------------------------------------------------- Bryan Cantrill, Sun Microsystems FishWorks. http://blogs.sun.com/bmc
On Sat, December 1, 2007 1:50 pm, Rich Morin wrote:> At 11:30 -0800 12/1/07, Bryan Cantrill wrote: >> ... I don''t know how kernel variables are tuned in MacOS. > > Mac OS X 10.5 has neither an /etc/system file nor an mdb > command. Although a bit of Googling turned up this hint: > > http://www.commandlinemac.com/article.php?story=20071029182310790 > > Running "sysctl -a" does not list any variables that have > the string "dtrace" in them. Suggestions, anyone? >There isn''t any method for setting these values currently :-(. James M
At 0:17 -0800 2/12/07, jmcilree at apple.com wrote:>There isn''t any method for setting these values currently :-(.And this is now being tracked as: <rdar://problem/5625473> Need way to tune DTrace tunables I presume this value only comes into effect when a large DOF is actually loaded (that is, you can change it post boot). If that''s true you could write a KEXT to set it at system startup [1], or tune it at runtime using the "live kernel debugging" facility of GDB in 10.5. <http://developer.apple.com/releasenotes/DeveloperTools/RN-GDB/index.html> S+E -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware [1] Because the variable is not part of the KPI, this KEXT would have to link against the entire kernel. That means it would break with each kernel update. This is not something I''d recommend for shrink wrap software, but it''s fine for experimental code, or code with a limited distribution.
On Mon, Dec 03, 2007 at 11:17:10AM +0000, Quinn wrote:> And this is now being tracked as: > > <rdar://problem/5625473> Need way to tune DTrace tunablesDoes that mean you''ll be porting mdb ;-) - ahl -- Adam Leventhal, FishWorks http://blogs.sun.com/ahl