[illumos-Developer] [dtrace-discuss] dynamic size argument to tracemem()
Adam Leventhal
ahl at delphix.com
Tue Jul 12 16:54:08 PDT 2011
Hey Bryan,
Did you consider having the behavior be that if the third argument was
greater than the second (unsigned) that it would generate an error?
Regarding tst.dynsize.d, could the output fail to match if the tick
probe switched CPUs? Is that sufficiently unlikely, or would it be
worth using a profile probe with a cpu predicate (caching the first
value we see)?
{ "tracemem", DT_IDENT_ACTFUNC, 0, DT_ACT_TRACEMEM,
DT_ATTR_STABCMN, DT_VERS_1_0,
- &dt_idops_func, "void(@, size_t)" },
+ &dt_idops_func, "void(@, size_t, ...)" },
I think that should be: "void(@, size_t, [size_t])" like copyinstr() or index().
Looks great.
Adam
On Mon, Jul 11, 2011 at 11:33 PM, Bryan Cantrill <bryan at joyent.com> wrote:
> All,
>
> With my apologies for having been somewhat on a tear through old
> DTrace RFEs, another that has been annoying as of late is that
> tracemem() does not take a dynamic size. Of course, EPIDs must
> correspond to a static size, so the fix is not to make the size
> entirely dynamic, but rather to add an optional third argument to
> tracemem() that is a D expression that captures the dynamic size --
> provided that it is no greater than the static size (still) provided
> as the second argument. A patch that implements this is attached for
> your review and consideration; as with our other work, this will be
> showing up at http://github.com/joyent/illumos-joyent in the near
> future (our ticket for this is OS-481, "DTrace tracemem() action
> should take a dynamic size argument"). Note the fix for another
> long-standing falls out of this: if you tracemem() something that is
> a string, it will show up as a proper hex dump instead of being
> interpreted as a string. Please let me know if you have any questions
> or comments!
>
> Thanks,
> Bryan
>
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org
>
--
Adam Leventhal, Delphix
http://dtrace.org/blogs/ahl
275 Middlefield Road, Suite 50
Menlo Park, CA 94025
http://www.delphix.com
More information about the Developer
mailing list