Skip to contentSkip to conversation

Make base-address-state tracing use LD_PRELOAD

PATCH New Paul Woegerer 1 participant 1 message Nov 26, 2013 1 message not in the archive

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 Make base-address-state tracing use LD_PRELOAD

In reply to a message not in the archive
---
 liblttng-ust-baddr/Makefile.am                     |  2 -
 liblttng-ust-baddr/lttng-ust-baddr.c               | 45 ++++---------
 liblttng-ust-baddr/lttng-ust-baddr.h               | 22 +++++++
 liblttng-ust-dl/Makefile.am                        |  5 +-
 .../ust_baddr.c                                    |  0
 .../ust_baddr.h                                    |  0
 liblttng-ust-dl/ustdl.c                            | 76 ++++++----------------
 liblttng-ust/lttng-ust-comm.c                      | 43 +-----------
 8 files changed, 62 insertions(+), 131 deletions(-)
 create mode 100644 liblttng-ust-baddr/lttng-ust-baddr.h
 rename {liblttng-ust-baddr => liblttng-ust-dl}/ust_baddr.c (100%)
 rename {liblttng-ust-baddr => liblttng-ust-dl}/ust_baddr.h (100%)
liblttng-ust-baddr/Makefile.am +0 -2
index 0d3cf28..23e4ce2 100644
@@ -4,8 +4,6 @@ AM_CFLAGS = -fno-strict-aliasing
 lib_LTLIBRARIES = liblttng-ust-baddr.la
 liblttng_ust_baddr_la_SOURCES = \
 	lttng-ust-baddr.c \
-	ust_baddr.c \
-	ust_baddr.h \
 	ust_baddr_statedump.c \
 	ust_baddr_statedump.h
 liblttng_ust_baddr_la_LIBADD = \
liblttng-ust-baddr/lttng-ust-baddr.c +14 -31

60 lines not on this page · raw message

liblttng-ust-baddr/lttng-ust-baddr.h new file +22 -0
new file mode 100644
index 0000000..2229150
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2013  Paul Woegerer <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#include <lttng/ust-events.h>
+
+int __attribute__((weak))
+lttng_ust_baddr_statedump(struct lttng_session *session);
liblttng-ust-dl/Makefile.am +4 -1
index c408fdd..352f145 100644
@@ -2,7 +2,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/include
 AM_CFLAGS = -fno-strict-aliasing
 
 lib_LTLIBRARIES = liblttng-ust-dl.la
-liblttng_ust_dl_la_SOURCES = ustdl.c
+liblttng_ust_dl_la_SOURCES = \
+	ustdl.c \
+	ust_baddr.c \
+	ust_baddr.h
 liblttng_ust_dl_la_LIBADD = \
 	$(top_builddir)/liblttng-ust/liblttng-ust.la
 
liblttng-ust-dl/ust_baddr.c renamed from liblttng-ust-baddr/ust_baddr.c +0 -0
similarity index 100%
rename from liblttng-ust-baddr/ust_baddr.c
rename to liblttng-ust-dl/ust_baddr.c
liblttng-ust-dl/ust_baddr.h renamed from liblttng-ust-baddr/ust_baddr.h +0 -0
similarity index 100%
rename from liblttng-ust-baddr/ust_baddr.h
rename to liblttng-ust-dl/ust_baddr.h
liblttng-ust-dl/ustdl.c +20 -56

107 lines not on this page · raw message

liblttng-ust/lttng-ust-comm.c +2 -41

73 lines not on this page · raw message

Signature · 1 line
1.8.4