Commit c2a4d3d7 authored by Anurag Asokan's avatar Anurag Asokan

LTTng logger (CTF)

This commit introduces LTTng logging mechanism which is an open source
tracing tool.

URL: https://lttng.org/
parent c599e172
...@@ -279,6 +279,7 @@ add_boolean_option(DEBUG_ASN1 False "Enable ASN1 debug logs" OFF) ...@@ -279,6 +279,7 @@ add_boolean_option(DEBUG_ASN1 False "Enable ASN1 debug logs" OFF)
# see common/utils/config.h # see common/utils/config.h
add_boolean_option(TRACE_ASN1C_ENC_DEC OFF "Enable ASN1 encoder/decoder debug traces via OAI logging system" ON) add_boolean_option(TRACE_ASN1C_ENC_DEC OFF "Enable ASN1 encoder/decoder debug traces via OAI logging system" ON)
add_boolean_option(T_TRACER True "Activate the T tracer, a debugging/monitoring framework" ON) add_boolean_option(T_TRACER True "Activate the T tracer, a debugging/monitoring framework" ON)
add_boolean_option(ENABLE_LTTNG False "Activate the LTTNG tracer, a debugging/monitoring framework" ON)
add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs" ON) add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs" ON)
add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace" ON) add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace" ON)
add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace" ON) add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace" ON)
...@@ -655,8 +656,13 @@ add_library(UTIL ...@@ -655,8 +656,13 @@ add_library(UTIL
${OPENAIR_DIR}/common/utils/time_meas.c ${OPENAIR_DIR}/common/utils/time_meas.c
${OPENAIR_DIR}/common/utils/time_stat.c ${OPENAIR_DIR}/common/utils/time_stat.c
) )
if (${ENABLE_LTTNG})
target_sources(UTIL PRIVATE ${OPENAIR_DIR}/common/utils/LOG/lttng-tp.c)
endif()
target_link_libraries(UTIL PUBLIC ${T_LIB} pthread) target_link_libraries(UTIL PUBLIC ${T_LIB} pthread)
if (${ENABLE_LTTNG})
target_link_libraries(UTIL PUBLIC lttng-ust)
endif()
set(SECURITY_SRC set(SECURITY_SRC
${OPENAIR3_DIR}/SECU/secu_defs.c ${OPENAIR3_DIR}/SECU/secu_defs.c
${OPENAIR3_DIR}/SECU/kdf.c ${OPENAIR3_DIR}/SECU/kdf.c
...@@ -1981,6 +1987,9 @@ target_link_libraries(lte-softmodem PRIVATE ...@@ -1981,6 +1987,9 @@ target_link_libraries(lte-softmodem PRIVATE
target_link_libraries(lte-softmodem PRIVATE pthread m CONFIG_LIB rt sctp) target_link_libraries(lte-softmodem PRIVATE pthread m CONFIG_LIB rt sctp)
target_link_libraries(lte-softmodem PRIVATE ${T_LIB}) target_link_libraries(lte-softmodem PRIVATE ${T_LIB})
target_link_libraries(lte-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) target_link_libraries(lte-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
if (${ENABLE_LTTNG})
target_link_libraries(lte-softmodem PUBLIC lttng-ust)
endif()
if(E2_AGENT) if(E2_AGENT)
target_compile_definitions(lte-softmodem PRIVATE E2_AGENT) target_compile_definitions(lte-softmodem PRIVATE E2_AGENT)
...@@ -2042,7 +2051,9 @@ target_link_libraries(lte-uesoftmodem PRIVATE ...@@ -2042,7 +2051,9 @@ target_link_libraries(lte-uesoftmodem PRIVATE
target_link_libraries(lte-uesoftmodem PRIVATE pthread m CONFIG_LIB rt sctp) target_link_libraries(lte-uesoftmodem PRIVATE pthread m CONFIG_LIB rt sctp)
target_link_libraries(lte-uesoftmodem PRIVATE ${T_LIB}) target_link_libraries(lte-uesoftmodem PRIVATE ${T_LIB})
target_link_libraries(lte-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) target_link_libraries(lte-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
if (${ENABLE_LTTNG})
target_link_libraries(lte-uesoftmodem PUBLIC lttng-ust)
endif()
# force the generation of ASN.1 so that we don't need to wait during the build # force the generation of ASN.1 so that we don't need to wait during the build
target_link_libraries(lte-uesoftmodem PRIVATE target_link_libraries(lte-uesoftmodem PRIVATE
asn1_lte_rrc asn1_s1ap asn1_m2ap asn1_m3ap asn1_x2ap) asn1_lte_rrc asn1_s1ap asn1_m2ap asn1_m3ap asn1_x2ap)
...@@ -2078,6 +2089,9 @@ target_link_libraries(nr-softmodem PRIVATE ...@@ -2078,6 +2089,9 @@ target_link_libraries(nr-softmodem PRIVATE
-Wl,--end-group z dl) -Wl,--end-group z dl)
target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt sctp) target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt sctp)
if (${ENABLE_LTTNG})
target_link_libraries(nr-softmodem PRIVATE lttng-ust)
endif()
target_link_libraries(nr-softmodem PRIVATE ${T_LIB}) target_link_libraries(nr-softmodem PRIVATE ${T_LIB})
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
...@@ -2120,6 +2134,9 @@ if(E2_AGENT) ...@@ -2120,6 +2134,9 @@ if(E2_AGENT)
target_compile_definitions(nr-cuup PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT) target_compile_definitions(nr-cuup PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT)
endif() endif()
if (${ENABLE_LTTNG})
target_link_libraries(nr-cuup PRIVATE lttng-ust)
endif()
# nr-uesoftmodem is UE implementation # nr-uesoftmodem is UE implementation
####################################### #######################################
...@@ -2150,6 +2167,9 @@ target_link_libraries(nr-uesoftmodem PRIVATE ...@@ -2150,6 +2167,9 @@ target_link_libraries(nr-uesoftmodem PRIVATE
target_link_libraries(nr-uesoftmodem PRIVATE pthread m CONFIG_LIB rt) target_link_libraries(nr-uesoftmodem PRIVATE pthread m CONFIG_LIB rt)
target_link_libraries(nr-uesoftmodem PRIVATE ${T_LIB}) target_link_libraries(nr-uesoftmodem PRIVATE ${T_LIB})
target_link_libraries(nr-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) target_link_libraries(nr-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
if (${ENABLE_LTTNG})
target_link_libraries(nr-uesoftmodem PRIVATE lttng-ust)
endif()
add_dependencies( nr-uesoftmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc ) add_dependencies( nr-uesoftmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
if (ENABLE_LDPC_CUDA) if (ENABLE_LDPC_CUDA)
......
...@@ -124,6 +124,8 @@ Options: ...@@ -124,6 +124,8 @@ Options:
--disable-cpu-affinity --disable-cpu-affinity
Disables CPU Affinity between UHD/TX/RX Threads (Valid only when deadline scheduler is disabled). By defaulT, CPU Affinity is enabled when not using deadline scheduler. It is enabled only with >2 CPUs. For eNB, CPU_0-> Device library (UHD), CPU_1->TX Threads, CPU_2...CPU_MAX->Rx Threads. For UE, CPU_0->Device Library(UHD), CPU_1..CPU_MAX -> All the UE threads Disables CPU Affinity between UHD/TX/RX Threads (Valid only when deadline scheduler is disabled). By defaulT, CPU Affinity is enabled when not using deadline scheduler. It is enabled only with >2 CPUs. For eNB, CPU_0-> Device library (UHD), CPU_1->TX Threads, CPU_2...CPU_MAX->Rx Threads. For UE, CPU_0->Device Library(UHD), CPU_1..CPU_MAX -> All the UE threads
--enable-cpu-affinity --enable-cpu-affinity
--enable-LTTNG
Enable LTTNG log. While lttng is enabled, T-Tracer will be disabled
--disable-T-Tracer --disable-T-Tracer
Disables the T tracer. Disables the T tracer.
--disable-hardware-dependency --disable-hardware-dependency
...@@ -349,6 +351,10 @@ function main() { ...@@ -349,6 +351,10 @@ function main() {
BUILD_DOXYGEN=1 BUILD_DOXYGEN=1
echo_info "Will build doxygen support" echo_info "Will build doxygen support"
shift;; shift;;
--enable-LTTNG)
CMAKE_CMD="$CMAKE_CMD -DENABLE_LTTNG=True -DT_TRACER=False"
echo_info "Enable LTTNG tracer"
shift 1;;
--disable-T-Tracer) --disable-T-Tracer)
CMAKE_CMD="$CMAKE_CMD -DT_TRACER=False" CMAKE_CMD="$CMAKE_CMD -DT_TRACER=False"
echo_info "Disabling the T tracer" echo_info "Disabling the T tracer"
......
...@@ -654,6 +654,8 @@ check_install_oai_software() { ...@@ -654,6 +654,8 @@ check_install_oai_software() {
install_asn1c_from_source $1 install_asn1c_from_source $1
install_simde_from_source $1 install_simde_from_source $1
install_lttng_deps $1
} }
install_asn1c_from_source(){ install_asn1c_from_source(){
...@@ -703,6 +705,87 @@ install_simde_from_source(){ ...@@ -703,6 +705,87 @@ install_simde_from_source(){
$SUDO \cp -rv ../simde /usr/include $SUDO \cp -rv ../simde /usr/include
} }
install_lttng_deps() {
install_libuuid
install_libxml2
install_popt_1_18_from_source
install_userspace_rcu
#install_lttng_modules_2_13_from_source
install_lttng_ust_2_13_from_source
install_lttng_tools_2_13_from_source
}
install_libuuid() {
echo_info "\nInstalling libuuid."
$SUDO apt-get install uuid-dev -y
}
install_libxml2(){
echo_info "\nInstalling libxml2."
$SUDO apt-get install libxml2-dev -y
}
install_popt_1_18_from_source() {
$SUDO $INSTALLER -y install wget
echo_info "\nInstalling popt_1_18."
cd $(mktemp -d) &&
wget http://ftp.rpm.org/popt/releases/popt-1.x/popt-1.18.tar.gz
tar -xf popt-1.18.tar.gz && cd popt-1.18
./configure && make -j16 && $SUDO make install
}
install_userspace_rcu() {
echo_info "\nInstalling U-RCU from source."
cd /tmp
$SUDO rm -rf /tmp/urcu
git clone https://github.com/urcu/userspace-rcu.git /tmp/urcu
cd /tmp/urcu
git checkout stable-0.12
./bootstrap && ./configure && make
$SUDO make install
$SUDO ldconfig
}
install_lttng_modules_2_13_from_source() {
$SUDO $INSTALLER -y install wget
echo_info "\nInstalling LTTng Modules."
cd $(mktemp -d) &&
wget https://lttng.org/files/lttng-modules/lttng-modules-latest-2.13.tar.bz2 &&
tar -xf lttng-modules-latest-2.13.tar.bz2 &&
cd lttng-modules-2.13.* &&
make &&
$SUDO make modules_install &&
$SUDO depmod -a
}
install_lttng_ust_2_13_from_source() {
$SUDO $INSTALLER -y install wget
echo_info "\nInstalling LTTng UST."
cd $(mktemp -d) &&
wget https://lttng.org/files/lttng-ust/lttng-ust-latest-2.13.tar.bz2 &&
tar -xf lttng-ust-latest-2.13.tar.bz2 &&
cd lttng-ust-2.13.* &&
./configure --disable-numa &&
make &&
$SUDO make install &&
$SUDO ldconfig
}
install_lttng_tools_2_13_from_source() {
$SUDO $INSTALLER -y install wget
echo_info "\nInstalling LTTng Tools."
cd $(mktemp -d) &&
wget https://lttng.org/files/lttng-tools/lttng-tools-latest-2.13.tar.bz2 &&
tar -xf lttng-tools-latest-2.13.tar.bz2 &&
cd lttng-tools-2.13.* &&
./configure &&
make &&
$SUDO make install &&
$SUDO ldconfig
}
################################################# #################################################
# 2. compile # 2. compile
################################################ ################################################
......
...@@ -604,6 +604,30 @@ void logRecord_mt(const char *file, ...@@ -604,6 +604,30 @@ void logRecord_mt(const char *file,
va_end(args); va_end(args);
} }
void logRecord_tp(const char *file,
const char *func,
int line,
int comp,
int level,
const char *format,
... )
{
log_component_t *c = &g_log->log_component[comp];
char header[48];
char buf[1024];
va_list args;
va_start(args, format);
vsnprintf(buf, sizeof(buf)-1, format, args);
va_end(args);
if(map_int_to_str(log_level_names, level) != NULL)
snprintf(header, sizeof(header)-1, "OAI-%s %s", c->name, map_int_to_str(log_level_names, level));
else
snprintf(header, sizeof(header)-1, "OAI-%s", c->name);
LOG_FC(header, func, line, buf) ;
}
void vlogRecord_mt(const char *file, void vlogRecord_mt(const char *file,
const char *func, const char *func,
int line, int line,
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#endif #endif
#include <pthread.h> #include <pthread.h>
#include <common/utils/utils.h> #include <common/utils/utils.h>
#include "lttng-log.h"
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
#include <assert.h> #include <assert.h>
#ifdef NDEBUG #ifdef NDEBUG
...@@ -286,6 +287,7 @@ void logTerm (void); ...@@ -286,6 +287,7 @@ void logTerm (void);
int isLogInitDone (void); int isLogInitDone (void);
void logRecord_mt(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7))); void logRecord_mt(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7)));
void vlogRecord_mt(const char *file, const char *func, int line, int comp, int level, const char *format, va_list args ); void vlogRecord_mt(const char *file, const char *func, int line, int comp, int level, const char *format, va_list args );
void logRecord_tp(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7)));
void log_dump(int component, void *buffer, int buffsize,int datatype, const char *format, ... ); void log_dump(int component, void *buffer, int buffsize,int datatype, const char *format, ... );
int set_log(int component, int level); int set_log(int component, int level);
void set_glog(int level); void set_glog(int level);
...@@ -414,12 +416,39 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int ...@@ -414,12 +416,39 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
/* define variable only used in LOG macro's */ /* define variable only used in LOG macro's */
# define LOG_VAR(A,B) A B # define LOG_VAR(A,B) A B
# else /* T_TRACER */ # else /* T_TRACER */
# define LOG_E(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} while (0) # if ENABLE_LTTNG
# define LOG_W(c, x...) do { if( g_log->log_component[c].level >= OAILOG_WARNING ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} while (0) # define LOG_E(c, x...) do { \
# define LOG_A(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ANALYSIS) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ANALYSIS, x);} while (0) if(g_log->log_component[c].level >= OAILOG_ERR) { \
# define LOG_I(c, x...) do { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} while (0) logRecord_tp(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_ERR, x); \
# define LOG_D(c, x...) do { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} while (0) } } while(0)
# define LOG_T(c, x...) do { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} while (0) # define LOG_W(c, x...) do { \
if(g_log->log_component[c].level >= OAILOG_WARNING) { \
logRecord_tp(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_WARNING, x); \
} } while(0)
# define LOG_A(c, x...) do { \
if(g_log->log_component[c].level >= OAILOG_ANALYSIS) { \
logRecord_tp(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_ANALYSIS, x);\
} } while(0)
# define LOG_I(c, x...) do { \
if(g_log->log_component[c].level >= OAILOG_INFO) { \
logRecord_tp(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_INFO, x); \
} } while(0)
# define LOG_D(c, x...) do { \
if(g_log->log_component[c].level >= OAILOG_DEBUG) { \
logRecord_tp(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_DEBUG, x); \
} } while(0)
# define LOG_T(c, x...) do { \
if(g_log->log_component[c].level >= OAILOG_TRACE) { \
logRecord_tp(__FILE__, __FUNCTION__, __LINE__, c, OAILOG_TRACE, x); \
} } while(0)
# else
# define LOG_E(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} while (0)
# define LOG_W(c, x...) do { if( g_log->log_component[c].level >= OAILOG_WARNING ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} while (0)
# define LOG_A(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ANALYSIS) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ANALYSIS, x);} while (0)
# define LOG_I(c, x...) do { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} while (0)
# define LOG_D(c, x...) do { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} while (0)
# define LOG_T(c, x...) do { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} while (0)
#endif
# define VLOG(c,l, f, args) do { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ; } while (0) # define VLOG(c,l, f, args) do { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ; } while (0)
# define nfapi_log(FILE, FNC, LN, COMP, LVL, FMT...) # define nfapi_log(FILE, FNC, LN, COMP, LVL, FMT...)
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file lttng-log.h
* \brief LTTng Log interface
* \author Anurag Asokan
* \date 2024
* \version 0.5
* @ingroup util
*/
#ifndef __LTTNG_LOG_H__
#define __LTTNG_LOG_H__
#include "lttng-tp.h"
/**
* TODO: Need to re-define the tracing format.
*/
#define LOG_FC(component, func, line, log) do { \
tracepoint(OAI, gNB, \
component, -1, -1, -1, func, line, log); \
} while(0)
#endif /** __LTTNG_LOG_H__ */
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file lttng-tp.c
* \brief Lttng trace implementaion
* \author Anurag Asokan
* \date 2024
* \version 0.5
* @ingroup util
*/
#define TRACEPOINT_CREATE_PROBES
#define TRACEPOINT_DEFINE
#include "lttng-tp.h"
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file lttng-tp.h
* \brief Lttng tracer implementaion
* \author Anurag Asokan
* \date 2024
* \version 0.5
* @ingroup util
*/
#undef TRACEPOINT_PROVIDER
#define TRACEPOINT_PROVIDER OAI
#undef TRACEPOINT_INCLUDE
#define TRACEPOINT_INCLUDE "./common/utils/LOG/lttng-tp.h"
#if !defined(_LTTNG_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
#define _LTTNG_TP_H
#include <stdbool.h>
#include <lttng/tracepoint.h>
TRACEPOINT_EVENT(
OAI,
gNB,
TP_ARGS(
const char*, log_modName,
int, event_id,
int, sfn,
int, slot,
const char*, funcName,
int, lineNo,
const char*, msg
),
TP_FIELDS(
ctf_string(MODNAME, log_modName)
ctf_integer(int32_t, EVENTID, event_id)
ctf_integer(int32_t, SFN, sfn)
ctf_integer(int32_t, SLOT, slot)
ctf_string(FUNCTION, funcName)
ctf_integer(int32_t, LINE, lineNo)
ctf_string(MSG, msg)
)
)
TRACEPOINT_LOGLEVEL(OAI, gNB, TRACE_DEBUG_FUNCTION)
#endif /* _LTTNG_TP_H */
#include <lttng/tracepoint-event.h>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment