Skip to content

Instantly share code, notes, and snippets.

View GlenTiki's full-sized avatar
🙊
🐨🍵 🍦🥋

Glen Keane GlenTiki

🙊
🐨🍵 🍦🥋
View GitHub Profile
vagrant@vagrant-ubuntu-trusty-64:~$ lttng create sessionA
Session sessionA created.
Traces will be written in /home/vagrant/lttng-traces/sessionA-20150428-145141
vagrant@vagrant-ubuntu-trusty-64:~$ lttng list
Available tracing sessions:
1) sessionA (/home/vagrant/lttng-traces/sessionA-20150428-145141) [inactive]
Trace path: /home/vagrant/lttng-traces/sessionA-20150428-145141
Live timer interval (usec): 0
var obj = new ObjectThatDoesAsyncStuff(); //create object
// create some `when` checks - when these conditions are met the code in them should run
// (right after the variable has been changed, this async `if` should be run on it)
when(obj.someNumber > 10 && obj.someNumber < 20) {
console.log('its in range! Fire the lazer!!');
}
when(obj.commandReady) {
Making all in lttng-sessiond
make[3]: Entering directory `/home/vagrant/lttng-tools/src/bin/lttng-sessiond'
CC save.o
save.c: In function ‘get_ust_context_type_string’:
save.c:263:7: error: ‘LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER’ undeclared (first use in this function)
case LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER:
^
save.c:263:7: note: each undeclared identifier is reported only once for each function it appears in
save.c: In function ‘save_ust_context’:
save.c:860:23: error: ‘LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER’ undeclared (first use in this function)
@GlenTiki
GlenTiki / gist:c51ed25eb3a5a603cb7e
Last active January 26, 2017 00:04
Hook idea's

What we have: a bunch of global trace events.

Globals:
 LTTNG_NET_SERVER_CONNECTION
 ...
 &&
 DTRACE_NET_SERVER_CONNECTION
 ...
#define SLURP_STRING(obj, member, valp) \
if (!(obj)->IsObject()) { \
return env->ThrowError( \
"expected object for " #obj " to contain string member " #member); \
} \
node::Utf8Value _##member(env->isolate(), \
obj->Get(OneByteString(env->isolate(), #member))); \
if ((*(const char **)valp = *_##member) == nullptr) \
*(const char **)valp = "<unknown>";
libust[2727/2727]: Warning: HOME environment variable not set.
Disabling LTTng-UST per-user tracing. (in setup_local_apps() at lttng-ust-comm.c:305)
libust[2727/2727]: Warning: HOME environment variable not set. Disabling LTTng-UST per-user tracing. (in setup_local_apps() at lttng-ust-comm.c:305)