Skip to content

Commit

Permalink
Added retracev2 command line utility
Browse files Browse the repository at this point in the history
  • Loading branch information
jjr840430 authored and ronaldtse committed Aug 9, 2018
1 parent e5ca804 commit 78c0df8
Show file tree
Hide file tree
Showing 10 changed files with 479 additions and 24 deletions.
9 changes: 9 additions & 0 deletions ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,12 @@ if [ ! -e "${CHECKPATCH_INSTALL}/checkpatch.pl" ]; then
patch -p0 < $SPWD/checkpatch.pl.patch
echo "invalid.struct.name" > const_structs.checkpatch
fi

# install libnereon
git clone -b v0.9.4 https://github.com/riboseinc/libnereon
cd libnereon
mkdir build
cd build
cmake ..
make
sudo make install
3 changes: 2 additions & 1 deletion ci/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ CHECKPATCH_FLAGS+=" --ignore SSCANF_TO_KSTRTO"
CHECKPATCH_FLAGS+=" --ignore EXECUTE_PERMISSIONS"
CHECKPATCH_FLAGS+=" --ignore MULTISTATEMENT_MACRO_USE_DO_WHILE"
CHECKPATCH_FLAGS+=" --ignore STORAGE_CLASS"
CHECKPATCH_FLAGS+=" --ignore SPDX_LICENSE_TAG"

# checkpatch.pl will ignore the following paths
CHECKPATCH_IGNORE+=" checkpatch.pl.patch Makefile test/Makefile test/http.redirect/hello.txt src/retrace_v2/parson.c src/retrace_v2/parson.h *.json"
CHECKPATCH_IGNORE+=" checkpatch.pl.patch Makefile test/Makefile test/http.redirect/hello.txt src/v2/parson.c src/v2/parson.h *.json"
CHECKPATCH_EXCLUDE=$(for p in $CHECKPATCH_IGNORE; do echo ":(exclude)$p" ; done)

function _checkpatch() {
Expand Down
8 changes: 5 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,21 @@ if test "x$enable_profiling" = "xyes" ; then
CFLAGS="$CFLAGS -pg"
fi

AC_MSG_CHECKING(whether to enable retrace v2)
AC_ARG_ENABLE(
[v2],
[AS_HELP_STRING([--enable-v2], [enable retrace version 2 @<:@default=no@:>@])],
,
[enable_v2="yes"]
[enable_v2="no"]
)
AC_MSG_RESULT($enable_v2)
AM_CONDITIONAL([RTR_V2], [test "x$enable_v2" = "xyes"])
if test "x$enable_v2" = "xyes" ; then
AX_CHECK_NEREON([], AC_MSG_ERROR([]))
AC_DEFINE(RTR_V2, [1], [Define to use retrace v2])
else
AC_DEFINE(RTR_V2, [1], [Define to use retrace v2])
AC_DEFINE(RTR_V2, [0], [Define to use retrace v2])
fi
AM_CONDITIONAL([RTR_V2], [test "x$enable_v2" = "xyes"])

AC_MSG_CHECKING(whether to enable rpc)
AC_ARG_ENABLE(rpc,
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ACLOCAL_AMFLAGS = -I m4

if RTR_V2
SUBDIRS= v2
SUBDIRS=v2
else
SUBDIRS= v1
SUBDIRS=v1
endif
11 changes: 7 additions & 4 deletions src/v2/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ libretrace_v2_la_SOURCES = \
logger.c \
funcs_symbols.S

libretrace_v2_la_CFLAGS = $(NEREON_INCLUDES) -Wall -Wextra
libretrace_v2_la_CFLAGS = $(NEREON_INCLUDES) -Wall -Wextra -shared -fPIC
libretrace_v2_la_LIBADD = $(NEREON_LIBDIR)/libnereon.a

if DARWIN
Expand Down Expand Up @@ -61,11 +61,14 @@ endif
bin_PROGRAMS=retrace2

retrace2_SOURCES = \
retrace_v2.c \
retrace_v2.nos.c
retrace_v2.nos.c \
retrace_v2.c

retrace_v2.nos.c: retrace_v2.nos
$(NEREON_TO_CC) retrace_v2.nos ./ retrace2
$(NEREON_TO_CC) retrace_v2.nos ./ rtr2

clean-local:
rm -rf retrace_v2.nos.c retrace_v2.nos.h

retrace2_CFLAGS = $(NEREON_INCLUDES) -Wall -Wextra
retrace2_LDADD = $(NEREON_LIBDIR)/libnereon.a
Expand Down
Loading

0 comments on commit 78c0df8

Please sign in to comment.