X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Ftracef.h;h=fff912d01eaa568b264db5f62893373847dcabc1;hb=516d12dae36538257fe57e8f7cf7e867068c33d1;hp=7e8b59ee3bc5abf3a63b665f36b093dc3733d500;hpb=866f2767f671ffbbff2c0511964f5a9a66358184;p=lttng-ust.git diff --git a/include/lttng/tracef.h b/include/lttng/tracef.h index 7e8b59ee..fff912d0 100644 --- a/include/lttng/tracef.h +++ b/include/lttng/tracef.h @@ -1,28 +1,12 @@ -#ifndef _LTTNG_UST_TRACEF_H -#define _LTTNG_UST_TRACEF_H - /* - * Copyright (C) 2013-2014 Mathieu Desnoyers - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * SPDX-License-Identifier: MIT * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * Copyright (C) 2013-2014 Mathieu Desnoyers */ +#ifndef _LTTNG_UST_TRACEF_H +#define _LTTNG_UST_TRACEF_H + #include #ifdef __cplusplus @@ -32,13 +16,21 @@ extern "C" { extern void _lttng_ust_tracef(const char *fmt, ...); +extern +void _lttng_ust_vtracef(const char *fmt, va_list ap); + #define tracef(fmt, ...) \ do { \ - STAP_PROBEV(tracepoint_lttng_ust_tracef, event, ## __VA_ARGS__); \ + LTTNG_STAP_PROBEV(tracepoint_lttng_ust_tracef, event, ## __VA_ARGS__); \ if (caa_unlikely(__tracepoint_lttng_ust_tracef___event.state)) \ _lttng_ust_tracef(fmt, ## __VA_ARGS__); \ } while (0) +#define vtracef(fmt, ap) \ + do { \ + if (caa_unlikely(__tracepoint_lttng_ust_tracef___event.state)) \ + _lttng_ust_vtracef(fmt, ap); \ + } while (0) #ifdef __cplusplus } #endif