Hi Trond, My only suggestion would be to use __ everywhere instead of _ as that seems more in keeping with DTrace convention.
Adam On Tue, Feb 26, 2008 at 08:37:43PM +0100, Trond Norbye wrote: > Hi, > > We would like to add USDT probes to Memcached ( > http://www.danga.com/memcached ). This is our current proposal: > > provider memcached { > /** > * Fired when a connection object is allocated from the connection pool > * @param connid the connection id > */ > probe conn_allocate(int connid); > > /** > * Fired when a connection object is released back to the connection pool > * @param connid the connection id > */ > probe conn_release(int connid); > > /** > * Fired when a new connection object is being created (there is no more > * connection objects in the connection pool) > * @param ptr pointer to the connection object > */ > probe conn_create(void *ptr); > > /** > * Fired when a connection object is being destroyed ("released back to > * the memory subsystem") > * @param ptr pointer to the connection object > */ > probe conn_destroy(void *ptr); > > /** > * Fired when a connection is dispatched from the "main thread" to a > * worker thread. > * @param connid the connection id > * @param threadid the thread id > */ > probe conn_dispatch(int connid, int threadid); > > /** > * Allocate memory from the slab allocator > * @param size the requested size > * @param slabclass the allocation will be fulfilled in this class > * @param slabsize the size of each item in this class > * @param ptr pointer to allocated memory > */ > probe slabs_allocate(int size, int slabclass, int slabsize, void* ptr); > > /** > * Failed to allocate memory (out of memory) > * @param size the requested size > * @param slabclass the class that failed to fulfill the request > */ > probe slabs_allocate_failed(int size, int slabclass); > > /** > * Fired when a slab class needs more space > * @param slabclass class that needs more memory > */ > probe slabs_slabclass_allocate(int slabclass); > > /** > * Failed to allocate memory (out of memory) > * @param slabclass the class that failed grab more memory > */ > probe slabs_slabclass_allocate_failed(int slabclass); > > /** > * Release memory > * @param size the size of the memory > * @param slabclass the class the memory belongs to > * @param ptr pointer to the memory to release > */ > probe slabs_free(int size, int slabclass, void* ptr); > > > /** > * Fired when the when we have searched the hash table for a named key. > * These two elements provide an insight in how well the hash function > * functions. Long traversals are a sign of a less optimal function, > * wasting cpu capacity. > * > * @param key the key searched for > * @param depth the depth in the list of hash table > */ > probe assoc_find(const char *key, int depth); > > /** > * Fired when a new item has been inserted. > * @param key the key just inserted > * @param nokeys the total number of keys currently being stored, > * including the key for which insert was called. > */ > probe assoc_insert(const char *key, int nokeys); > > /** > * Fired when a new item has been removed. > * @param key the key just deleted > * @param nokeys the total number of keys currently being stored, > * excluding the key for which delete was called. > */ > probe assoc_delete(const char *key, int nokeys); > > /** > * Fired when an item is being linked in the cache > * @param key the items key > * @param size the size of the data > */ > probe item_link(const char *key, int size); > > /** > * Fired when an item is being deleted > * @param key the items key > * @param size the size of the data > */ > probe item_unlink(const char *key, int size); > > /** > * Fired when the refcount for an item is reduced > * @param key the items key > * @param size the size of the data > */ > probe item_remove(const char *key, int size); > > /** > * Fired when the "last refenced" time is updated > * @param key the items key > * @param size the size of the data > */ > probe item_update(const char *key, int size); > > /** > * Fired when an item is bein replaced with another item > * @param oldkey the key of the item to replace > * @param oldsize the size of the old item > * @param newkey the key of the new item > * @param newsize the size of the new item > */ > probe item_replace(const char *oldkey, int oldsize, const char > *newkey, int newsize); > > /** > * Fired when the processing of a command starts > * @param connid the connection id > * @param request the incomming request > * @param size the size of the request > */ > probe process_command__start(int connid, const void *request, int size); > /** > * Fired when the processing of a command is done > * @param connid the connection id > * @param respnse the response to send back to the client > * @param size the size of the response > */ > probe process_command__end(int connid, const void *response, int size); > > /** > * Fired for a get-command > * @param connid connection id > * @param key requested key > * @param size size of the key's data (or -1 if not found) > */ > probe command__get(int connid, const char *key, int size); > > /** > * Fired for a gets command > * @param connid connection id > * @param key requested key > * @param size size of the key's data (or -1 if not found) > * @param casid the casid for the item > */ > probe command__gets(int connid, const char *key, int size, int64_t > casid); > > /** > * Fired for a add-command > * @param connid connection id > * @param key requested key > * @param size the new size of the key's data (or -1 if not found) > */ > probe command__add(int connid, const char *key, int size); > /** > * Fired for a set-command > * @param connid connection id > * @param key requested key > * @param size the new size of the key's data (or -1 if not found) > */ > probe command__set(int connid, const char *key, int size); > /** > * Fired for a replace-command > * @param connid connection id > * @param key requested key > * @param size the new size of the key's data (or -1 if not found) > */ > probe command__replace(int connid, const char *key, int size); > /** > * Fired for a prepend-command > * @param connid connection id > * @param key requested key > * @param size the new size of the key's data (or -1 if not found) > */ > probe command__prepend(int connid, const char *key, int size); > /** > * Fired for a append-command > * @param connid connection id > * @param key requested key > * @param size the new size of the key's data (or -1 if not found) > */ > probe command__append(int connid, const char *key, int size); > > /** > * Fired for a cas-command > * @param connid connection id > * @param key requested key > * @param size size of the key's data (or -1 if not found) > * @param casid the cas id requested > */ > probe command__cas(int connid, const char *key, int size, int64_t casid); > > /** > * Fired for incr command > * @param connid connection id > * @param key the requested key > * @param val the new value > */ > probe command__incr(int connid, const char *key, int64_t val); > > /** > * Fired for decr command > * @param connid connection id > * @param key the requested key > * @param val the new value > */ > probe command__decr(int connid, const char *key, int64_t val); > > /** > * Fired for a delete command > * @param connid connection id > * @param key the requested key > * @param exptime the expiry time > */ > probe command__delete(int connid, const char *key, long exptime); > > }; > > #pragma D attributes Unstable/Unstable/Common provider memcached provider > #pragma D attributes Private/Private/Common provider memcached module > #pragma D attributes Private/Private/Common provider memcached function > #pragma D attributes Unstable/Unstable/Common provider memcached name > #pragma D attributes Unstable/Unstable/Common provider memcached args > > _______________________________________________ > dtrace-discuss mailing list > [email protected] -- Adam Leventhal, Fishworks http://blogs.sun.com/ahl _______________________________________________ dtrace-discuss mailing list [email protected]
