Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lttng_utils.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Andreas Pokorny <andreas.pokorny@canonical.com>
17  */
18 
19 #include <lttng/tracepoint.h>
20 #include <stdint.h>
21 
22 #ifdef __clang__
23 /*
24  * TRACEPOINT_EVENT defines functions; since we disable tracepoints under clang
25  * these functions are unused and so generate fatal warnings.
26  * (see mir_tracepoint.h and http://sourceware.org/bugzilla/show_bug.cgi?id=13974)
27  */
28 #pragma clang diagnostic push
29 #pragma clang diagnostic warning "-Wunused-function"
30 #endif
31 
32 #ifndef _MIR_LTTNG_UTILS_H_
33 #define _MIR_LTTNG_UTILS_H_
34 
35 #define MIR_LTTNG_VOID_TRACE_CALL(klass, comp, name) \
36  void mir::report::lttng::klass::name() \
37  { \
38  mir_tracepoint(comp, name, 0); \
39  }
40 
41 #define MIR_LTTNG_VOID_TRACE_CLASS(comp) \
42  TRACEPOINT_EVENT_CLASS(comp, dummy_event, TP_ARGS(int,empty), TP_FIELDS(ctf_integer(int,empty,empty)))
43 #define MIR_LTTNG_VOID_TRACE_POINT(comp, name) \
44  TRACEPOINT_EVENT_INSTANCE(comp, dummy_event, name, TP_ARGS(int,empty))
45 
46 #endif
47 

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Apr 11 21:14:53 UTC 2014