The stopwatch schema is brought here mainly to serve an example. As its name suggests, it is simply a stopwatch: it has two events, EVENT_START and EVENT_STOP, marking the beginning and end of some events, respectively. Since it is a generic stopwatch, the schema does not even has a matching kernel patch, simply because it is aimed a measuring anything -- just place the klogger calls before and after the event you wish to measure.
Each events has an id field, to match a start event to its adjoining stop event, and to separate different events from each other. By checking the timestamp in the headers of both events, you can measure the cycles the event in question took.
To measure events, simply use the following template in your kernel code:
klogger(EVENT_START, user_chosen_event_id); /* The event in question... */ klogger(EVENT_STOP, user_chosen_event_id);
Use this basic schema as a template, adding more data to the event payload to get a feeling of klogger's operation.