|
Packit |
c04fcb |
/*
|
|
Packit |
c04fcb |
* Copyright (C) 2011-2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
|
Packit |
c04fcb |
*
|
|
Packit |
c04fcb |
* This library is free software; you can redistribute it and/or
|
|
Packit |
c04fcb |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
c04fcb |
* License as published by the Free Software Foundation; either
|
|
Packit |
c04fcb |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
c04fcb |
*
|
|
Packit |
c04fcb |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
c04fcb |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
c04fcb |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
c04fcb |
* Lesser General Public License for more details.
|
|
Packit |
c04fcb |
*
|
|
Packit |
c04fcb |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
c04fcb |
* License along with this library; if not, write to the Free Software
|
|
Packit |
c04fcb |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
Packit |
c04fcb |
*/
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
#define _LGPL_SOURCE
|
|
Packit |
c04fcb |
#define _GNU_SOURCE
|
|
Packit |
c04fcb |
#include <dlfcn.h>
|
|
Packit |
c04fcb |
#include <sys/types.h>
|
|
Packit |
c04fcb |
#include <stdio.h>
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
#define TRACEPOINT_DEFINE
|
|
Packit |
c04fcb |
#define TRACEPOINT_CREATE_PROBES
|
|
Packit |
c04fcb |
#define TP_IP_PARAM func_addr
|
|
Packit |
c04fcb |
#include "lttng-ust-cyg-profile.h"
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
void __cyg_profile_func_enter(void *this_fn, void *call_site)
|
|
Packit |
c04fcb |
__attribute__((no_instrument_function));
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
void __cyg_profile_func_exit(void *this_fn, void *call_site)
|
|
Packit |
c04fcb |
__attribute__((no_instrument_function));
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
void __cyg_profile_func_enter(void *this_fn, void *call_site)
|
|
Packit |
c04fcb |
{
|
|
Packit |
c04fcb |
tracepoint(lttng_ust_cyg_profile, func_entry, this_fn, call_site);
|
|
Packit |
c04fcb |
}
|
|
Packit |
c04fcb |
|
|
Packit |
c04fcb |
void __cyg_profile_func_exit(void *this_fn, void *call_site)
|
|
Packit |
c04fcb |
{
|
|
Packit |
c04fcb |
tracepoint(lttng_ust_cyg_profile, func_exit, this_fn, call_site);
|
|
Packit |
c04fcb |
}
|