Skip to content

Instantly share code, notes, and snippets.

@simark
Last active December 16, 2015 17:59
Show Gist options
  • Save simark/5474258 to your computer and use it in GitHub Desktop.
Save simark/5474258 to your computer and use it in GitHub Desktop.
$ lttng create
$ lttng enable-event -u -a
$ lttng start
$ ./memcached
Generate some traffic. There are some printfs that indicate that both tracepoints should be hit.
$ lttng stop
$ lttng destroy
// Get command request. Whenever a worker processes a get command.
TRACEPOINT_EVENT(
memcached,
cmd_get,
TP_ARGS(char *, key, int, vlen),
TP_FIELDS(
ctf_string(message, key)
ctf_integer(int, vlen, vlen)
)
)
// Server starting tracepoint (should be hit once at the beginning of the execution)
TRACEPOINT_EVENT(
memcached,
server_start,
TP_ARGS(int, test),
TP_FIELDS(
ctf_integer(int, test, test)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment