projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix conditional compilation of gdb support
[lttng-ust.git]
/
libust
/
marker.c
diff --git
a/libust/marker.c
b/libust/marker.c
index 47b6d11fc0c65f29873c951049d33a4ddbf7ccd9..d9cb88fca96b7c0f8521e32b1c270ed1ae549df7 100644
(file)
--- a/
libust/marker.c
+++ b/
libust/marker.c
@@
-46,8
+46,11
@@
volatile __thread long *ust_reg_stack_ptr = (long *) 0;
extern struct marker __start___markers[] __attribute__((visibility("hidden")));
extern struct marker __stop___markers[] __attribute__((visibility("hidden")));
extern struct marker __start___markers[] __attribute__((visibility("hidden")));
extern struct marker __stop___markers[] __attribute__((visibility("hidden")));
+
+#ifdef CONFIG_UST_GDB_INTEGRATION
extern struct marker_addr __start___marker_addr[] __attribute__((visibility("hidden")));
extern struct marker_addr __stop___marker_addr[] __attribute__((visibility("hidden")));
extern struct marker_addr __start___marker_addr[] __attribute__((visibility("hidden")));
extern struct marker_addr __stop___marker_addr[] __attribute__((visibility("hidden")));
+#endif
/* Set to 1 to enable marker debug output */
static const int marker_debug;
/* Set to 1 to enable marker debug output */
static const int marker_debug;
@@
-1509,13
+1512,17
@@
int marker_register_lib(struct marker *markers_start, struct marker_addr *marker
pl = (struct lib *) malloc(sizeof(struct lib));
pl->markers_start = markers_start;
pl = (struct lib *) malloc(sizeof(struct lib));
pl->markers_start = markers_start;
+#ifdef CONFIG_UST_GDB_INTEGRATION
pl->markers_addr_start = marker_addr_start;
pl->markers_addr_start = marker_addr_start;
+#endif
pl->markers_count = markers_count;
pl->markers_count = markers_count;
+#ifdef CONFIG_UST_GDB_INTEGRATION
lock_markers();
for(addr = marker_addr_start; addr < marker_addr_start + markers_count; addr++)
addr->marker->location = addr->addr;
unlock_markers();
lock_markers();
for(addr = marker_addr_start; addr < marker_addr_start + markers_count; addr++)
addr->marker->location = addr->addr;
unlock_markers();
+#endif
/* FIXME: maybe protect this with its own mutex? */
lock_markers();
/* FIXME: maybe protect this with its own mutex? */
lock_markers();
@@
-1545,7
+1552,11
@@
static int initialized = 0;
void __attribute__((constructor)) init_markers(void)
{
if(!initialized) {
void __attribute__((constructor)) init_markers(void)
{
if(!initialized) {
+#ifdef CONFIG_UST_GDB_INTEGRATION
marker_register_lib(__start___markers, __start___marker_addr, (((long)__stop___markers)-((long)__start___markers))/sizeof(struct marker));
marker_register_lib(__start___markers, __start___marker_addr, (((long)__stop___markers)-((long)__start___markers))/sizeof(struct marker));
+#else
+ marker_register_lib(__start___markers, NULL, (((long)__stop___markers)-((long)__start___markers))/sizeof(struct marker));
+#endif
//DBG("markers_start: %p, markers_stop: %p\n", __start___markers, __stop___markers);
initialized = 1;
}
//DBG("markers_start: %p, markers_stop: %p\n", __start___markers, __stop___markers);
initialized = 1;
}
This page took
0.024432 seconds
and
4
git commands to generate.