17
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
The actual probe names in DTrace scripts will replace '__' by '-'. Thus
22
insert__row__start will be insert-row-start.
24
Recommendations for adding new probes:
26
- each probe should have the minimal set of arguments required to
27
unambiguously identify the context in which the probe fires. Redundant
28
probes (i.e. the ones that can be obtained in user scripts from previous
29
probes' arguments or otherwise) may be added for convenience.
31
- try to avoid computationally expensive probe arguments. If impossible,
32
use *_ENABLED() macros to check if the probe is activated before
33
performing expensive calculations for a probe argument.
35
- all *-done probes should have a status argument wherever applicable to make
36
it possible for user scripts to figure out whether the completed operation
37
was successful or not.
39
- for all status arguments, a non-zero value should be returned on error or
40
failure, 0 should be returned on success.
21
probe external_lock(int);
22
probe insert_row_start();
23
probe insert_row_end();
24
probe filesort_start();
45
/* The following ones fire when creating or closing a client connection */
46
probe connection__start(unsigned long conn_id);
47
probe connection__done(unsigned long conn_id);
50
* Fire at the start/end of any client command processing (including SQL
53
probe command__start(unsigned long conn_id, int command);
54
probe command__done(int status);
57
* The following probes fire at the start/end of any SQL query processing,
60
* query_start() has a lot of parameters that can be used to pick up
61
* parameters for a lot of other probes here. For simplicity reasons we also
62
* add the query string to most other DTrace probes as well. Hostname is
63
* either the hostname or the IP address of the Drizzle client.
65
probe query__start(const char *query,
66
unsigned long conn_id,
68
probe query__done(int status);
70
/* Fire at the start/end of SQL query parsing */
71
probe query__parse__start(const char *query);
72
probe query__parse__done(int status);
75
* This probe fires when the actual query execution starts
77
probe query__exec__start(const char *query,
80
probe query__exec__done(int status);
82
/* These probes fire when performing write operations towards any handler */
83
probe insert__row__start(const char *db, const char *table);
84
probe insert__row__done(int status);
85
probe update__row__start(const char *db, const char *table);
86
probe update__row__done(int status);
87
probe delete__row__start(const char *db, const char *table);
88
probe delete__row__done(int status);
91
* These probes fire when calling external_lock for any handler
92
* depending on the lock type being acquired or released.
94
probe handler__rdlock__start(const char *db, const char *table);
95
probe handler__wrlock__start(const char *db, const char *table);
96
probe handler__unlock__start(const char *db, const char *table);
97
probe handler__rdlock__done(int status);
98
probe handler__wrlock__done(int status);
99
probe handler__unlock__done(int status);
102
* These probes fire when a filesort activity happens in a query.
104
probe filesort__start(const char *db, const char *table);
105
probe filesort__done(int status, unsigned long rows);
107
* The query types SELECT, INSERT, INSERT AS SELECT, UPDATE, DELETE
109
* The start probe always contains the query text.
111
probe select__start(const char *query);
112
probe select__done(int status, unsigned long rows);
113
probe insert__start(const char *query);
114
probe insert__done(int status, unsigned long rows);
115
probe insert__select__start(const char *query);
116
probe insert__select__done(int status, unsigned long rows);
117
probe update__start(const char *query);
118
probe update__done(int status,
119
unsigned long rowsmatches, unsigned long rowschanged);
120
probe delete__start(const char *query);
121
probe delete__done(int status, unsigned long rows);