PATCH: Add DTrace probes
Roy.Lyseng at Sun.COM
Fri Mar 7 13:37:37 UTC 2008
Another, slightly more advanced script is memcached-keytrace.d:
/pid == $target && copyinstr(arg1) == "123456789"/
This one will trace set, add, delete and get commands applied to one
dtrace -s ~/memcached/dtrace/memcached-trace.d -p 24167
Then run a telnet session:
telnet system 11211
Connected to system.
Escape character is '^]'.
set 123456789 0 0 10
delete 123456789 0 0
get 123456789 0 0 0
And the dtrace script reports:
CPU ID FUNCTION:NAME
1 54165 complete_nread:command-set 123456789
0 54159 process_delete_command:command-delete 123456789
1 54160 process_get_command:command-get 123456789
Dustin Sallings wrote:
> For those of us who haven't truly unleashed the power of dtrace, can
> you describe the kinds of things we can learn from this (perhaps with
> --Dustin Sallings (mobile)
> On Mar 6, 2008, at 4:48, Trond Norbye <Trond.Norbye at Sun.COM> wrote:
>> On Mar 5, 2008, at 3:52 PM, Trond Norbye wrote:
>>> The following patch adds a new configure-option (--enable-dtrace)
>>> that adds DTrace probes to various parts of memcached.
>>> Please comment.
>> I discovered that I had some "leftovers" in this patch from before I
>> fixed the comments regarding the large page support..
>> The attached version is replacement for the original patch.
More information about the memcached