Responses inline: On Thu, May 24, 2012 at 6:56 PM, <chip.benn...@exeloncorp.com> wrote: > Chad, > > That was very helpful, thank-you. > > So it sounds like you're saying that if the check expression has no cacheable > components, it doesn't matter if I put the check in the predicate, or if I > break the logic into two clauses and put the check in the first clause, with > a thread-local variable to trigger the second clause.
Well, actually, you would see some benefit from breaking it into two clauses, if the predicate from the first clause is cacheable (like /execname == "oracle" /.) And you would see some benefit from the second clause if its predicate is also cacheable. > > Or at the least, I should try to break out the cacheable parts of the check > expression, and include that in the predicate. > > So a macro, like $$1 is cacheable, but an inline constant isn't? I guess the > post-macro parsing of "D" sees $$1 the same as "abc", so I suppose that makes > sense. But an inline constant is just as fixed as a quoted string, so I'd > think it would be a good candidate for caching. But inlines aren't necessarily constant values. For example, the following is a valid inline: inline string vtype = (this->vnode->v_type == VCHR) ? "CHR" : "BLK"; Chad _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org