Skip to content

Instantly share code, notes, and snippets.

@vjanandr
vjanandr / gettime_vdso
Last active August 10, 2016 18:41
get time vdso
#include <sys/time.h>
#include <time.h>
#include <stdio.h>
#include <dlfcn.h>
#include <errno.h>
int (*vdso_get_time)(struct timeval*, struct timezone *);
void *vdso_handle = NULL;
Linux(debug)#
Linux(debug)# clear
Linux(debug)# lttng create
Session auto-20170823-003745 created.
Traces will be written in /root/lttng-traces/auto-20170823-003745
Linux(debug)# lttng enable-event -u 'tp_0:*'
UST event tp_0:* created in channel channel0
Linux(debug)#
Linux(debug)# lttng start
Tracing started for session auto-20170823-003745
@vjanandr
vjanandr / hello.c
Created April 5, 2016 07:20
32 bit application
#include <stdio.h>
#include <lttng/tracef.h>
int main(int argc, char *argv[])
{
int x;
puts("Hello, World!\nPress Enter to continue...");
/*
@vjanandr
vjanandr / config.log
Created April 5, 2016 07:16
lttng tools 64 bit build with 32 bit consumerd
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by lttng-tools configure 2.7.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/usr --with-consumerd32-libdir=/usr/lib32 --with-consumerd32-bin=/usr/lib32/lttng/libexec/lttng-consumerd --with-lttng-ust-prefix=/usr/lib32 LDFLAGS=-L/usr/lib32 -L/usr/lib/i386-linux-gnu
## --------- ##
## Platform. ##