remove old usertrace
[lttv.git] / ltt-usertrace / ltt-facility-loader-user_generic.c
CommitLineData
3d57eb5b 1/*
2 * ltt-facility-loader-user_generic.c
3 *
4 * (C) Copyright 2005 -
5 * Mathieu Desnoyers (mathieu.desnoyers@polymtl.ca)
6 *
7 * Contains the LTT user space facility loader.
8 *
9 */
10
11
12#define LTT_TRACE
13#include <error.h>
14#include <stdio.h>
15#include <ltt/ltt-generic.h>
16#include "ltt-facility-loader-user_generic.h"
17
18static struct user_facility_info facility = {
19 .name = LTT_FACILITY_NAME,
20 .num_events = LTT_FACILITY_NUM_EVENTS,
21#ifndef LTT_PACK
22 .alignment = sizeof(void*),
23#else
24 .alignment = 0,
25#endif //LTT_PACK
26 .checksum = LTT_FACILITY_CHECKSUM,
27 .int_size = sizeof(int),
28 .long_size = sizeof(long),
29 .pointer_size = sizeof(void*),
30 .size_t_size = sizeof(size_t)
31};
32
33static void __attribute__((constructor)) __ltt_user_init(void)
34{
35 int err;
15146922 36#ifdef LTT_SHOW_DEBUG
3d57eb5b 37 printf("LTT : ltt-facility-user_generic init in userspace\n");
15146922 38#endif //LTT_SHOW_DEBUG
3d57eb5b 39
40 err = ltt_register_generic(&LTT_FACILITY_SYMBOL, &facility);
41 LTT_FACILITY_CHECKSUM_SYMBOL = LTT_FACILITY_SYMBOL;
42
43 if(err) {
15146922 44#ifdef LTT_SHOW_DEBUG
3d57eb5b 45 perror("Error in ltt_register_generic");
15146922 46#endif //LTT_SHOW_DEBUG
3d57eb5b 47 }
48}
49
This page took 0.024946 seconds and 4 git commands to generate.