Re: [dtrace-discuss] Slow start of Dtrace?

2010-03-15 Thread Jon Haslam
Hi Henk, This one is a slight nuisance on systems with large CPU counts. When using dtrace(1M), the DTrace subsystem ends up allocating a pair of 4MB buffers for its principal buffers and the same again if you are using aggregations. This becomes a ton of memory to setup and tear down on a system

Re: [dtrace-discuss] Dtrace starts very slowly on T5440

2010-02-20 Thread Jon Haslam
Just for the record, I had an offline exchange with Ryan on this. The startup time when using dtrace(1M) on systems with many CPU's such as the T5440 can be large owing to the default principal and aggregation buffer sizes (4MB). To reduce the startup latency, tune these down (if possible) by sett

Re: [dtrace-discuss] dtrace -G: unused provider screws up other provider?

2010-01-20 Thread Jon Haslam
Hi Joe, Thanks for the good test case. Yes, this seems to be a bug. It appears that we end up generating malformed DOF when unreferenced providers are included as in your example. This will mean that we reject the DOF when it's loaded into the kernel and you therefore don't get any probes. I've

Re: [dtrace-discuss] number of probes or times the probe triggered: which one impact more to the performance?

2010-01-16 Thread Jon Haslam
Hi Daniel, One script has 10k probes, but they are rarely triggered. Another script has only one probe, but the probe triggered 10k per second. Which one will impact the OS performance to a larger extent? In another word: performance impact depends on the number of probes or times any probe t

Re: [dtrace-discuss] 32-bit/64-bit weirdness

2009-12-03 Thread Jon Haslam
Hi Drew, I'm wondering if this is expected behavior, or a bug. Expected but not all that obvious really. See below. Given this D: # cat smb_logon.d pid$target::smb_logon:entry { add=&((struct netr_client *)arg0)->username; printf("%p",add); exit(); } and this defintion: typedef struct

Re: [dtrace-discuss] maximum length of probefunc

2009-11-30 Thread Jon Haslam
Hi Joel, Is there a setting I can use to make sure probefunc is not cut off at 127 characters? As James said, this is a hardcoded limit so there's not an awful lot you can do about it. Sorry. Sometime we should really revisit the current static allocations. FYI, there is an open bug which co

Re: [dtrace-discuss] user function not shown in hotuser

2009-11-19 Thread Jon Haslam
Hi Max, I am using the hotuser script to trace user functions in the output I get some lines that show hex address instead of function: libc.so.1`0xfe54c080 2375 2.4% libc.so.1`0xfe54b884 3254 3.2% libc.so.1`0xfe54c364

Re: [dtrace-discuss] Dtrace error - ic_len definition uses incompatible types

2009-11-11 Thread Jon Haslam
Hi, You're probably running into the following issue which is an OpenSolaris upgrade related problem: http://defect.opensolaris.org/bz/show_bug.cgi?id=11609 Unfortunately, this breaks the type information that DTrace uses. I'm not really aware of anything that you can do to get DTrace working c

Re: [dtrace-discuss] DTrace (API) version?

2009-11-11 Thread Jon Haslam
Hi Brian, I did find this: http://hub.opensolaris.org/bin/view/Community+Group+dtrace/ChangeLog But unfortunately, it doesn't map DTrace API Version numbers to the SNV build numbers. This would be useful, for example, for knowing which of these DTrace features, if any, are available in a Sol

Re: [dtrace-discuss] Question about -xlaxyload option to dtrace -G

2009-11-11 Thread Jon Haslam
Hi Robert, I am trying to get documentation how how this lazyloading happens when you are dealing with dtrace probes being added to user applications. In particular if it somehow avoids the overhead of registering dtrace probes when they aren't needed, how does it know if they are needed

Re: [dtrace-discuss] substr()

2009-10-20 Thread Jon Haslam
Hi Joseph, What is the status of DTrace substr function? It was integrated into Neveda build 15 and it is available on Solaris 10 systems (U4 - u8 x64) I am working on. I cannot find any documentation on it, and there appears to be a bug in it that I cannot reproduced on OpenSolaris. I thin

Re: [dtrace-discuss] How to dtrace thread_reaper?

2009-10-20 Thread Jon Haslam
Hi Thomas, I want to trace the thread_reaper and want to find out, how often it runs and how many threads it really reaps. I use this one-liner in the first step: [r...@itotcsol104 bin]# dtrace -n 'fbt:genunix:thread_reaper: { @num[probefunc] = count(); }' dtrace: description 'fbt:genunix:thre

Re: [dtrace-discuss] plockstat mutex hold output question

2009-10-06 Thread Jon Haslam
Hi Max, From taking a quick look at plockstat.c, the nsec column is a sum of the number of nanoseconds that a mutex is held. Count is a count of the number of times the mutex is acquired. According to this output, a malloc lock is aquired and released approximately 4 million times, but the t

Re: [dtrace-discuss] DTrace dumps core with dtrace -n 'pid3524:::*read* {}'

2009-09-30 Thread Jon Haslam
Hi Krish, Oops. Yes, there seems to be a bit of an issue here so thanks for flagging it. I'll follow up offline with you. Jon. Hi all, I ran the following one-liner, dtrace -n 'pid3524:::*read* {}' and dtrace dumped core. Of course the intention was to place '*read*' as probefunc. Shouldn't dt

Re: [dtrace-discuss] trunc(@a, @b, @c, @d, @e, ..., 20);

2009-09-29 Thread Jon Haslam
Hi Joel, Is there a way to truncate multiple aggregations collectively? No. The trunc() function just operates on a single aggregation. Jon. For Example, to display 20 or less records for the below: ... @a[pid,self->addr,self->name,self->id] = sum(itema); @b[pid,self->addr,self->name,self-

Re: [dtrace-discuss] Why is plockstat provider only present for 1 process

2009-09-18 Thread Jon Haslam
Does the same apply for the pid provider? I have seen pid providers with dtrace -l. At the moment the command does not list any pid providers. Yes, pid provider probes won't appear in the ouput of `dtrace -l` until they have been explicitly created (by enabling them): # dtrace -l -P pid* I

Re: [dtrace-discuss] Why is plockstat provider only present for 1 process

2009-09-18 Thread Jon Haslam
Hi Hans, I would like to know why dtrace -l |grep plockstat show plockstat28099 lines. Process with pid 28099 is a java process. Why can I not examine other processes with the plockstat provider? Is it a java startup option? No. The probes that plockstat uses only become visible when you ac

Re: [dtrace-discuss] sharing of variables between scripts

2009-09-11 Thread Jon Haslam
Hi Joel, I'm running dtrace with multiple scripts, e.g. -s foo.d -s bar.d -s baz.d. It looks like variables in one script overwrite variables in another. I was expecting, perhaps wrongfully, that variables would be per-script and not per dtrace run. I guess it may not be too obvious from th

Re: [dtrace-discuss] Dtrace manual

2009-09-03 Thread Jon Haslam
OK. Latest version I can see is a year old, http://dlc.sun.com/pdf/817-6223/817-6223.pdf from http://docs.sun.com/app/docs/doc/817-6223/6mlkidlgj?l=en&a=view That's the latest version. With the help of the most excellent Alta I have exported the wiki guide to pdf and it doesn't look too bad

Re: [dtrace-discuss] Dtrace manual

2009-09-03 Thread Jon Haslam
Hi Andrew, Does the Wiki dtrace manual get converted into the PDF version anywhere? The one on docs.sun.com seems to be significantly older (although I may be looking in the wrong place). I want to print off and bind a couple of copies to leave with a customer after a session there. Can't see

Re: [dtrace-discuss] function of semtimedop is not in syscall provider in dtrace

2009-08-07 Thread Jon Haslam
Hi Daniel, If use truss on an oracle process. we could see something like the following, so semtimedop should be a syscall 22459/1: semtimedop(9, 0xFD7FFFDFE648, 1, 0xFD7FFFDFE488) EAGAIN 22459/1: semnum=15semop=-1semflg=0 22459/1: timeout: 2.06000 sec b

Re: [dtrace-discuss] CPC provider

2009-08-06 Thread Jon Haslam
Hi Rayson, Is it possible to provide an interface for other providers to read data from the hardware performance counters? The current CPC provider gives us hardware "events", but not the actual value of the counters. Say if I am interested in the number of cache misses caused a function, I can

Re: [dtrace-discuss] Possible to read current value of aggregate?

2009-06-26 Thread Jon Haslam
Sorry, one more question... is it safe to fire up multiple dtrace_hdl_t within a process? Sure, a consumer can do multiple opens. Chad's advice is good (as always). Especially the bit about offering to send you a stripped down consumer :-) . Jon. Ryan Jon Haslam wrote: In parti

Re: [dtrace-discuss] Possible to read current value of aggregate?

2009-06-26 Thread Jon Haslam
In particular, this shouldn't be an issue unless you are enabling foo12345::: probes (that is, any providers with PIDs in them) Ah, but I am... that was the way for my app to tell dtrace it wants the latest stats... the question was how to get the answer back since I can't copyout() the ag

Re: [dtrace-discuss] Possible to read current value of aggregate?

2009-06-26 Thread Jon Haslam
Can you provide any specifics regarding these bad things? Well, libdtrace is rather underdocumented, but according to the folks behind TclDTrace, "Note that *dtrace_close* is needed to prevent an epic fail. It does a major cleanup, that involves restoring the state of all grabbed processes, w

Re: [dtrace-discuss] Possible to read current value of aggregate?

2009-06-26 Thread Jon Haslam
rs may well chime in with suggestions. Yes, with libdtrace you would have to do some leg work yourself with coding but the joy and pleasure it will give you will far outweigh any pain you may have encountered along the way :-) . Have a go. You know you want to. Jon. Did I miss something? Ryan J

Re: [dtrace-discuss] Possible to read current value of aggregate?

2009-06-26 Thread Jon Haslam
Hi Ryan, You need to use libdtrace(3LIB) to get this done in a clean manner. There are a bunch of tools in Solaris that you can look at for examples of how to use the interfaces. These include plockstat(1M), instrat(1M), lockstat(1M) and powertop(1M) to name a few. Jon. Hi all, I'm trying to ga

Re: [dtrace-discuss] Why do I need /usr/lib/dtrace/iscsi.d ?

2009-06-25 Thread Jon Haslam
Is this because /usr/lib/dtrace/iscsit.d references the translator iscsiinfo_t that appears to be defined in /usr/lib/dtrace/iscsi.d ? Would the #pragma D depends_on lines help pkg find *.d file dependencies? Yes, it is because of that. As you say, D Library dependencies are expressed by usi

Re: [dtrace-discuss] does dtrace uses any special hardware for tracing

2009-06-22 Thread Jon Haslam
I too had the same intuition that DTrace works completely in software, but after knowing that there is Performance Monitoring Unit(PMU) present in intel's chip, so I got confused if DTRace uses it, also same type of hardware is present in AMD's chip. I might be wrong. The intel/amd micro

Re: [dtrace-discuss] PID provider can not create memcpy:return probe for 64bit process

2009-04-22 Thread Jon Haslam
/onnv/onnv-gate/usr/src/lib/libdtrace/i386/dt_isadep.c#78 Jon. Thanks Zhihui 2009/4/23 Jon Haslam <mailto:jonathan.has...@sun.com>> Hi Zhihi, This could be owing to the fact that there we've found jump tables in the instructions. If DTrace finds jump tables when a

Re: [dtrace-discuss] PID provider can not create memcpy:return probe for 64bit process

2009-04-22 Thread Jon Haslam
Hi Zhihi, This could be owing to the fact that there we've found jump tables in the instructions. If DTrace finds jump tables when attempting to create probes it goes into an ultra conservative mode of operation. To see if this is the problem, set the DTRACE_DEBUG environment variable before inv

Re: [dtrace-discuss] dtrace variable access from multiple threads

2009-04-06 Thread Jon Haslam
Hi Angelo, One of my ISVs have been looking for the atomic operation for global variables as well. While we wait for this feature, do you have any ideas for a reasonably good work around, now? There isn't an RFE for this; if there is a need (or a perceived need) then please log an RFE on beha

Re: [dtrace-discuss] ustack. what's the meaning of ---> mysqld`_Z12write_recordP3THDP8st_tableP12st_copy_info+0x53

2009-04-04 Thread Jon Haslam
Hi, The process being traced is written in C++ and the symbols are mangled and we don't do any auto-demangling in Solaris. The demangled version of the function looks like: $ dem _Z12write_recordP3THDP8st_tableP12st_copy_info _Z12write_recordP3THDP8st_tableP12st_copy_info == write_record(THD*,

Re: [dtrace-discuss] func() builtin does not resolve correctly on unix module

2009-03-10 Thread Jon Haslam
Hi Pavan, And given below is the output that I see: unix`mutex_enter 802562 unix`ip_ocsum 2644713 unix`0xfb842691253 ^^ Usually when I see unresolved functions o

Re: [dtrace-discuss] FBT Provider

2009-03-10 Thread Jon Haslam
Hi Paul, Is there a list anywhere of the DTrace FBT provider calls for each version of Solaris since the Nevada build that hosed the DTrace Toolkit. I have no issue with rewriting what I need, but I am hoping to stave off having to look at all the source code to find everything. I know ther

Re: [dtrace-discuss] dtrace panic

2009-03-09 Thread Jon Haslam
Hi, A fix for this was put into snv_94. Upgrade to the latest bits if you can and you should be OK. Jon. On SNV91 we are getting the following kernel panic using DTrace. Core dump are available. Mar 9 18:14:55 SVR24 unix: [ID 10 kern.notice] Mar 9 18:14:55 SVR24 unix: [ID 839527 kern.

Re: [dtrace-discuss] data structures in dtrace

2009-03-06 Thread Jon Haslam
Hi, do we have any possibility of including a data structure in dtrace?? it would be advantageous and can act like a buffer Sorry but I don't understand what you want to do here. Can you give an example of the kind of thing you are referring to? Jon. ___

Re: [dtrace-discuss] cpc provider available in snv_109?

2009-02-20 Thread Jon Haslam
Hi Jin, # ./ex1.d dtrace: failed to compile script ./ex1.d: line 3: probe description cpc:::inst_retired-1 does not match any probes Does snv_109 support cpc provider? Yes, the provider is in snv_109 and, as Dan says, you need to specify a mode. You may know this anyway as you're

Re: [dtrace-discuss] key #1 is incompatible with prototype

2009-02-17 Thread Jon Haslam
Hi Rafael, Works fine for me :-) . I'll pick up 6805610 and work this offline with you. Jon. Here's a simpler example. I'm running OpenSolaris snv_107 on x86. r...@catfish:/sandbox/tmp$ pfexec dtrace -n 'cpu-change-speed{printf("%d\n", ((cpudrv_devstate_t *)arg0)->cpu_id)}' dtrace: invalid

[dtrace-discuss] The cpc provider cometh

2009-02-16 Thread Jon Haslam
Hi, Finally, the long promised CPU performance counter provider has arrived into Nevada build 109! For those that need an injection of excitement at the start of the week, you can check out some usage examples on my blog: http://blogs.sun.com/jonh/entry/finally_dtrace_meets_the_cpu Also, you ca

Re: [dtrace-discuss] Systemtap and Dtrace Comparison

2009-01-21 Thread Jon Haslam
file > with function's prototypes and manually create probe for each > function. To have > better idea there is an application which I have tried which does > similar thing on > windows platform: www.autodebug.com. > > Remek > > On Wed, Jan 21, 2009 at 1:01

Re: [dtrace-discuss] Systemtap and Dtrace Comparison

2009-01-21 Thread Jon Haslam
> probe arbitrary statements in code symbolically (function entry, exit, > interior, source code co-ordinates): > yes (using debugging information) > > If that is true than they are a bit ahead in this area. I am really > missing it in dtrace. > Having this it would make dtrace user-land instrumen

Re: [dtrace-discuss] profile:::tick-1 requires dtrace_kernel privilege?

2008-12-12 Thread Jon Haslam
Hi Toby, > However when I run D code using this probe I don't see any output > unless I add the dtrace_kernel privilege. > > Here the D code I am using (this is in a script that I run as dtrace > -s tick-1.d): > > /* > * Count off and report the number of seconds elapsed > */ > dtrace:::BEGIN

Re: [dtrace-discuss] Printing the main script responsible for writing a file

2008-11-25 Thread Jon Haslam
Hi Deba, > Now I want to know which script is updating this file. I would like to the > see the output of "ptree 18786". I am not sure how to this structure of ptree > or the name of the script. The simple approach may just be to stop the target process, ptree it and then continue it: #!/usr/s

Re: [dtrace-discuss] Seg fault in printa

2008-11-25 Thread Jon Haslam
I'm following this up with Shiv directly and I'll post to the alias if anything interesting falls out of it. Jon. > printa() in the below script results in segmentation fault. If %A in > dtrace:::END is changed to %a, there is not segmentation fault but the > output is in hex form (Ex: OUT: 8 0xf

Re: [dtrace-discuss] Visualizing a call graph

2008-11-24 Thread Jon Haslam
> This is what exactly what I have in mind. Did you do it the way I am > thinking? The 'jzgraph' project is well but dead. So, probably I shall > have to generate a 'dot' file and then externally feed it to 'dotty'. Firstly, the approach you're taking is OK but you'll probably run into some issue

Re: [dtrace-discuss] Visualizing a call graph

2008-11-24 Thread Jon Haslam
Hi Amit, > Basically, I would like to have a graphical display showing me the > call flow between the various functions- starting and ending at the > starting function. I have thought about it a bit. I have written a > regex to identify the various columns. After some intermediate data > storage u

Re: [dtrace-discuss] How to analyze the core stack like this?

2008-11-11 Thread Jon Haslam
Hi Mike, If nobody has picked this up, I'll sponsor you. Contact me offline and we'll take it from there. Jon. > On Sat, Sep 20, 2008 at 7:57 AM, Mike Gerdts <[EMAIL PROTECTED]> wrote: > >> On Fri, Sep 19, 2008 at 9:31 PM, Mike Gerdts <[EMAIL PROTECTED]> wrote: >> >>> I still think that

Re: [dtrace-discuss] Variable mpid - what is it?

2008-11-08 Thread Jon Haslam
Hi Shiv, > DTraceToolkit has a dtrace script (Proc/pidpersec.d) that refers to a > variable mpid as below > > profile:::tick-1sec > { > printf("%-22Y %8d %6d\n", walltimestamp, `mpid, pids); > pids = 0; > } > > Where is `mpid getting picked from (it isn't declared anywhere else)? The ba

[dtrace-discuss] Change Log Updated

2008-10-15 Thread Jon Haslam
Hi, For those that are interested, the DTrace change log has been updated (up to and including build 101): http://opensolaris.org/os/community/dtrace/ChangeLog Jon. ___ dtrace-discuss mailing list dtrace-discuss@opensolaris.org

Re: [dtrace-discuss] Privileges required for "caller"?

2008-10-06 Thread Jon Haslam
Hi Manfred, > Unfortunately this doesn't appear to be in the docs - sorry about > that. You can feel free to add it to the wiki yourself or I'll try > and do it shortly. I just saw your wiki update for the above - many thanks! Much appreciated. Jon. __

Re: [dtrace-discuss] Privileges required for "caller"?

2008-10-06 Thread Jon Haslam
Hi Manfred, > DTrace features the built-in variable caller (from chapter 3 of the Solaris > Dynamic Tracing Guide: uintptr_t caller - The program counter location of the > current thread just before entering the current probe). > > I tried to use caller (trace(caller)) in a script of mine and go

Re: [dtrace-discuss] New Solaris 10 DTrace Guide -- or is it??

2008-10-06 Thread Jon Haslam
>> The DTrace documentation on docs.sun.com should be following the online wiki >> documentation. The wiki is the primary source of documentation: >> >> http://wikis.sun.com/display/DTrace/Documentation > > Is there any convenient way to convert wiki source into some printable > format (pdf?) ?

Re: [dtrace-discuss] getting newest version of dtrace

2008-10-06 Thread Jon Haslam
>> From a features point of view they should be pretty much the same as U4. > Is this to be read as "there will only be bugfixes in U6"? Yes. Pretty much only escalated bugs. > Is there a Sun policy on what features (not) to propagate from OpenSolaris > Dtrace to Solaris? And are these backpor

Re: [dtrace-discuss] getting newest version of dtrace

2008-09-30 Thread Jon Haslam
Hi Manfred, > Full Ack. It's quite difficult, though, to predict what DTrace features one > will get when installing Solaris 10 (whatever release). There is nothing > about the fine details of DTrace in the Solaris 10 What's New documents. > > "printa() with multiple aggregations" is a nice fea

Re: [dtrace-discuss] pid-provider sees ld.so.1 only

2008-09-04 Thread Jon Haslam
Hi Thomas, Apologies for not following up on the list to your reply. I'm glad that you can now move forward with your DTrace based endeavors and hope that this wasn't too much of a pain to get sorted. > Maybe this historical "restriction" and DTrace-Zone-NFS restriction find > their way into the

Re: [dtrace-discuss] pid-provider sees ld.so.1 only

2008-08-28 Thread Jon Haslam
Hi Thomas, Thanks for the debug data - I think I know what's going on now (for those who are wondering - I contacted Thomas offline to get some debug and ask some questions). > I get this strange behavior when (as non-root with dtrace-proc and > dtrace-user privs) I try to trace a process in a n

Re: [dtrace-discuss] dtrace io on zfs

2008-08-22 Thread Jon Haslam
For those that are interested there is an open bug on this: 6266202: DTrace io provider doesn't work with ZFS Jon. > On Aug 22, 2008, at 7:31 AM, Ben Rockwood wrote: > > >> John Dzilvelis wrote: >> >>> Hello, >>> I have recently started using iosnoop from the dtrace toolkit to >>> moni

Re: [dtrace-discuss] How accurate is "ustack"?

2008-08-22 Thread Jon Haslam
ther mmu context/ustack() related issue on 4v and I'll verify the source of this then. Jon. > > Jon Haslam wrote: > >>> One more thing. On the T1000, I run this script: >>> >>> #!/usr/sbin/dtrace -s >>> profile-997 >>> /arg1 &a

Re: [dtrace-discuss] How accurate is "ustack"?

2008-08-20 Thread Jon Haslam
> One more thing. On the T1000, I run this script: > > #!/usr/sbin/dtrace -s > profile-997 > /arg1 && execname == "ssh"/ > { > @[execname,pid,ustack()]=count() > } > profile-997 > /arg1 && execname == "sshd"/ > { > @[execname,pid,ustack()]=count() > } > profile-50s > { >

Re: [dtrace-discuss] CPC provider - input welcome

2008-07-23 Thread Jon Haslam
d just be using > dtrace as a quick way of enabling and disabling the specific counters > we want to track.) The user guide chapter will have more and different examples. I'll have a play around with that idea but I'm not sure how useful it is to correlate values that we've

Re: [dtrace-discuss] CPC provider - input welcome

2008-07-23 Thread Jon Haslam
Tracing Fans, I know it's been a long time in coming but the CPU Performance Counter (CPC) provider is almost here! The code is currently in for review and a proposed architecture document is attached here for review. Many thanks to all those that gave me feedback on this proposal. A revised ve

Re: [dtrace-discuss] CPC provider - input welcome

2008-07-18 Thread Jon Haslam
Jon. > On Jul 14, 2008, at 3:42 AM, Jon Haslam wrote: > > >> Tracing Fans, >> >> I know it's been a long time in coming but the CPU Performance >> Counter (CPC) provider is almost here! The code is currently in >> for review and a proposed ar

Re: [dtrace-discuss] CPC provider - input welcome

2008-07-16 Thread Jon Haslam
Hi Brian, > I'd like to suggest adding something to the error to indicate that the > problem is that another probe is already enabled that conflicts with > this one. The current message "Failed to enable probe" is pretty much > the same as "it didn't work" and will be doubly confusing because t

Re: [dtrace-discuss] CPC provider - input welcome

2008-07-15 Thread Jon Haslam
Hi James, > You may need a "per type" of overflow limit. A 3 - 4GHz cpu will > generate > 300k - 400k events per second when tracking cycles. > > Some of the more exotic cache behavior counters might fire only 1-2k > events > per second, though. When you combine that with the need

Re: [dtrace-discuss] CPC provider - input welcome

2008-07-15 Thread Jon Haslam
Hi Chad, >> >> Only one of cpustat and DTrace may use the counter hardware at any one time. >> Ownership of the counters is given on a first-come, first-served basis. > > I'm curious, how does DTrace interact with DTrace in this situation? > Specifically, if two DTrace invocations (either separate

Re: [dtrace-discuss] CPC provider - input welcome

2008-07-14 Thread Jon Haslam
Hi Phil, > Looks good! Thanks! > I guess the thing which most people are going to pick up on is the > sampling granularity. I just wonder whether you should always have to > specify this, or whether you should pick up some sensible (safe) > default; I guess there are pros and cons, the downside

[dtrace-discuss] CPC provider - input welcome

2008-07-14 Thread Jon Haslam
Tracing Fans, I know it's been a long time in coming but the CPU Performance Counter (CPC) provider is almost here! The code is currently in for review and a proposed architecture document is attached here for review. Any and all feedback/questions on the proposed implementation is welcome. Tha

Re: [dtrace-discuss] copyin having secondary effects.

2008-07-07 Thread Jon Haslam
Hi Chris, Scratch space is only valid for the duration of a clause so the scratch space you had the alias pointers in is most likely getting trashed by the copyinstr(). You need to stash the pointers away in something more permanent if you want to access them at a later time. Jon. > Dtracing get

Re: [dtrace-discuss] Nevada pid provider strangeness

2008-07-04 Thread Jon Haslam
Hi Chris, Looks like this is being caused by the change to direct bindings that happened in snv_83. Basically, when direct binding is specified we get an implicit -z lazyload on the link so libraries that ON tools link against are now are marked for lazy loading: #elfdump -d /bin/getent Dynamic

Re: [dtrace-discuss] Nevada pid provider strangeness

2008-07-03 Thread Jon Haslam
Hi Chris, Yeah, something looks to be broken. Use the '-Z' option for now as a workaround and I'll take a look at it. Jon. > On nevada build 93 if I specify anything other than a wild card for the pid > providers probefunc or probemod dtrace can't find the probes. > > So with wild cards I get:

Re: [dtrace-discuss] the vtrace provider

2008-06-02 Thread Jon Haslam
a vestige of a tracing system from bygone days. Jon. > > Thanks. > > > On Fri, May 30, 2008 at 7:28 PM, Jon Haslam <[EMAIL PROTECTED]> wrote: >>> The comments at the top of sys/vtrace.h explains the background, but >>> doesn't state in detail how to use it

Re: [dtrace-discuss] the vtrace provider

2008-05-30 Thread Jon Haslam
> The comments at the top of sys/vtrace.h explains the background, but > doesn't state in detail how to use it. In particular, what the type > and the format of the arguments are. > > For example, to monitor this (in uts/common/inet/ip/ip.c) > TRACE_1(TR_FAC_IP, TR_IP_RPUT_START, "ip_input

Re: [dtrace-discuss] the vtrace provider

2008-05-29 Thread Jon Haslam
Hi Tuma, > Anyone knows about the vtrace provider? When I was reading the code, I > find some traces like TRACE_1, TRACE_2, etc. The comments says they're > now replaced by Dtrace's vtrace provider, but I couldn't find any > documents about this vtrace provider. I googled and searched on > docs.su

Re: [dtrace-discuss] Next finding about DTrace in MySQL

2008-05-19 Thread Jon Haslam
Hi Mikael, > So with this limitation and the limitation that dtrace -G -s only > applies to object > files and not to libraries the only workaround I find is that one > needs to build all > object files in them same directory as the binary or can anyone come > up with > a different workaroun

[dtrace-discuss] DTrace Java API on Mac OS?

2008-05-16 Thread Jon Haslam
Hi, Question for the Apple team I guess... Do Apple have any plans to ship the DTrace Java API anytime? Just to be clear, I'm referring to the code under: http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libdtrace_jni Thanks. Jon. ___

Re: [dtrace-discuss] recent USDT enhancements

2008-05-09 Thread Jon Haslam
Hi Jenny, By the looks of it this fix went into the Solaris 10 KU patch - at least I can see it in 120011-14 which was released in Sep 2007. No idea what the current KU patch is though. Jon. > Hi, Adam, > > Is there any patch for sol10 for the bug#6370454(support USDT probes in > static functio

Re: [dtrace-discuss] Capability of memory overwritten detection

2008-04-16 Thread Jon Haslam
Hi Mitsu, > I have a problem to sort out a memory overwritten of our Application > on Solaris 10. > I wonder if it is possible to detect memory overwritten by using > dtrace. I have worked for power pc platform before and I have usually > used the DABR register to detect the memory overwritte

Re: [dtrace-discuss] DTrace wiki dain-bramage (was Wish List items)

2008-04-03 Thread Jon Haslam
> However, I must make a meta-comment. This wiki (Confluence) > has some real drawbacks. Why isn't Sun using a time-tested, > Open Source, Enterprise wiki such as TWiki? We just have to use the infrastructure that's provided so there's not a lot that we can do for now. Your points are duly note

Re: [dtrace-discuss] Putting Wish List items on the DTrace wiki?

2008-04-03 Thread Jon Haslam
Hi Rich, Apologies for taking a while but I've put a page on the DTrace wiki space where one and all can record their deepest desires (purely for DTrace enhancements though!). http://wikis.sun.com/display/DTrace/The+Wish+List Jon. > [ I posted this a week ago, but haven't seen any response. > >

Re: [dtrace-discuss] Iterating over all LWPs

2008-03-26 Thread Jon Haslam
>> Using time based probes to iterate over data structures is >> problematic as the data structures may well change beneath you. >> I offered this up as an example of how to iterate over data structures >> using a tick probe as it gets referenced quite a bit but there aren't that >> many examples

Re: [dtrace-discuss] Iterating over all LWPs

2008-03-26 Thread Jon Haslam
>> self->pidp = `pidhash[$1 & (`pid_hashsz - 1)]; > > what is backtick doing here in front of pidhash? Is it a way > of accessing an arbitrary kernel variable? Yes. The backquote is a scoping operator for kernel variables. See the External Variables section in the docs: http://wikis.sun.

Re: [dtrace-discuss] Iterating over all LWPs

2008-03-25 Thread Jon Haslam
Hi Roman, > Here's the problem I'm facing: I need to sample a particular > attribute of all the LWPs in a given process. Now, sampling > itself is no problem -- I can use profile/tick provider and > all is good. The problem is: I can't seem to think of a > DTrace-friendly way to iterate over all

Re: [dtrace-discuss] Putting Wish List items on the DTrace wiki?

2008-03-20 Thread Jon Haslam
Hi Rich, In case you weren't aware, you can view and log RFE's (Requests for Enhancements) via bugs.opensolaris.org. However, this interface is a bit limited and I do understand it's probably not the greatest way to interact with the bug tracking system that we use. I'm quite open to there being

Re: [dtrace-discuss] dtrace documentation - how do you find/use it ?

2008-02-28 Thread Jon Haslam
> That said, I've often thought a quick reference card might be handy; I'm > pretty sure Jon H showed me a Sun-only version of such a thing back in > the early days, although that could be my memory playing tricks. But it > seems so old-fashioned; perhaps some DTrace quick reference wallpaper, > w

Re: [dtrace-discuss] Struggling with dynvar space: how big should it become?

2008-02-28 Thread Jon Haslam
Sorry for the bad form of replying to myself but I didn't finish what I had to say before I sent it. Sigh. Without the unit specifier we should be cleaning at the highest rate possible - 5000hz. I just wanted to make sure you were cleaning at this rate and that you really were getting the rate you

Re: [dtrace-discuss] Struggling with dynvar space: how big should it become?

2008-02-28 Thread Jon Haslam
Hi Paul, > Trying to get a script to run for an hour. Up till now every attempt failed > before the hour was over. Latest command was: > > dtrace -q -x dynvarsize=16g -x cleanrate=400 -s /DTrace/newstr2. Try specifying a unit for your cleanrate frequency i.e. 400hz. Without a unit I'd have exp

Re: [dtrace-discuss] DTrace Toolkit tcpsnoop

2008-02-28 Thread Jon Haslam
Hi Bill, At the minute we don't have an in-built mechanism for dumping the data in a packet. There is an RFE which may be of interest: 6314638 Dtrace needs a packet dumper For now you'd have to roll something yourself to get this done. Jon. > I sent this to Brendan but never got a response. M

Re: [dtrace-discuss] Solaris Dynamic Tracing Guide gets Wikified!

2008-01-30 Thread Jon Haslam
notes there. >>> >>> It may also be useful to add a chapter that discusses platform >>> differences at a >>> high level. >>> >>> Just some thoughts...if the platform differences are not vast enough to >>> warrant >>> adding format

Re: [dtrace-discuss] Leopard DTrace source

2007-12-18 Thread Jon Haslam
Hi James, > I just got word, the OS X dtrace source has been posted: > > http://www.opensource.apple.com/darwinsource/10.5/dtrace-48/ > > In the interest of full disclosure, the sources as they sit will not > build correctly. This isn't a plot, plan, or other scheming, its simply

Re: [dtrace-discuss] how to trace fd not closed by a process

2007-12-12 Thread Jon Haslam
Hi Jan, I think that putting a probe on fbt::closef:entry should give you what you want: # cat rel.d #!/usr/sbin/dtrace -s fbt::closef:entry /execname == "foo && args[0]->f_vnode->v_path != NULL/ { @[stringof(args[0]->f_vnode->v_path)] = count(); } # ./rel.d dtrace: script './rel.d' mat

Re: [dtrace-discuss] trace structure elements

2007-12-06 Thread Jon Haslam
> There's an easy way to dump all the elements of a structure like the > sdump scat command or the print mdb command No, such a thing doesn't exist at the minute. There is an open RFE for it though: 4968681: would like ::printf-like functionality in DTrace Jon. ___

Re: [dtrace-discuss] Missing struct?

2007-12-05 Thread Jon Haslam
entioned though, using fbt may be easier for you. You always have options with DTrace! Jon. > Jon Haslam wrote: > >>> What determines what struct dtrace knows about by default? >>> >>> I am trying to use dtrace to trace the input and output to >>> the

Re: [dtrace-discuss] Missing struct?

2007-12-05 Thread Jon Haslam
> What determines what struct dtrace knows about by default? > > I am trying to use dtrace to trace the input and output to > the ntp_adjtime call. The ntp_adjtime call takes a single > argument, namely a pointer to a timex struct. Even though > that struct is the argument to a syscall, dtrace doe

[dtrace-discuss] Solaris Dynamic Tracing Guide gets Wikified!

2007-11-27 Thread Jon Haslam
Tracers, Good news! The Solaris Dynamic Tracing Guide has entered the participation age at last and has been converted into wiki format. The new and shiny guide can be found at: http://wikis.sun.com/display/DTrace/Documentation The guide has fallen behind with developments in DTrace since it was

Re: [dtrace-discuss] How to dereference a pointer to a pointer

2007-11-20 Thread Jon Haslam
> Typically, when I assign a variable in dtrace, I cast it first, like > this: > > fbt::foo:entry > { > self->vpp = (vnode_t **)arg0; > } There's no need to cast in this situation though as, with the fbt provider, you can just access typed arguments through the args[] array. Just use args[2

Re: [dtrace-discuss] Integer overflow in aggregations

2007-11-01 Thread Jon Haslam
>>(Where I'll be using the "sqrt(avg(x^2) - avg(x)^2)" approximation to >>standard deviation.) >> >>While this solution is fast, the problem is that data[2] faces >>overflow much sooner than data[1], especially if you're looking at >>data like time in nanoseconds. >> > >H...yes. Your two choi

Re: [dtrace-discuss] Access hardware counters with DTrace

2007-10-30 Thread Jon Haslam
Hi Neelam, >I am also looking something very similar. I want to use hardware performance >counters inside dtrace. Could you provide me some pointers if this could be >done. > > The CPC provider I'm been working on is taking shape, albeit slowly. I hope to have some archives ready for around t

Re: [dtrace-discuss] tracing hastorgeplus code

2007-10-29 Thread Jon Haslam
Hi Jeevan, >how can i get the value of a variable in some application code >(hastorageplus) without using usdt probes ? > >can we get it directly using dtrace ? > You can but the level of effort required is dependent upon the scope of the variable in question (i.e. if it's global or local). Thi

Re: [dtrace-discuss] List of DTrace probes/provides in libc ?

2007-10-18 Thread Jon Haslam
Hi Roland, > Is there anywhere a list of DTrace probes/provides which are supported > by libc ? As with any other user-land library, DTrace can dynamically instrument libc down to individual instructions via the 'pid' provider. For example, to see a list of which function entry points can be ins

  1   2   >