Alex Peng
2006-Sep-21 06:55 UTC
[dtrace-discuss] how to monitor the changes to the "reference count"?
Hi gurus, Is there a general way to monitor the changes to the "reference count"? One possible method is as in CONN_INC_REF()/CONN_DEC_REF(), see: http://cvs.opensolaris.org/source/xref/on/usr/src/uts/common/inet/ipclassifier.h#295 which is just adding SDT probes before the refcnt changes. I want to trace other reference counts, but I hate to add SDTs. Is it possible add this feature into "lockstat" provider? Thanks, -Alex This message posted from opensolaris.org
Adam Leventhal
2006-Sep-21 14:53 UTC
[dtrace-discuss] how to monitor the changes to the "reference count"?
On Wed, Sep 20, 2006 at 11:55:35PM -0700, Alex Peng wrote:> Is there a general way to monitor the changes to the "reference count"? > One possible method is as in CONN_INC_REF()/CONN_DEC_REF(), see: > > I want to trace other reference counts, but I hate to add SDTs. Is it > possible add this feature into "lockstat" provider?Building this into lockstat wouldn''t be any less intrusive or any less work (it would probably be more work). Without using SDT probes, the only other option is to use fbt probes, and that may or may not apply to the situation you have in mind. Adam -- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Alex Peng
2006-Sep-22 13:57 UTC
[dtrace-discuss] Re: how to monitor the changes to the "reference
OK, only fbt probes is not enough. What I want is to have a probe close to that refcnt++ (or refcnt--). So do you mean that SDT could be the most suitable solution in this case? Then I am fine with adding more SDT probes. Anyway, since it''s mostly for private use, I can decide when to add them, and when to remove them. If I feel some probes would be benefic for others, I will post them, that''s the way to enhance DTrace, right? Thanks, -Alex This message posted from opensolaris.org