Rename for the new liburcu API namespace
[ust.git] / libust / marker.c
index 86b06cffdbc37a0d4e17ad9ec2be8a87d89b8bab..39e12bb2307423c0e97164fbdcd0ae59d98798d4 100644 (file)
@@ -20,8 +20,9 @@
 #include <errno.h>
 #define _LGPL_SOURCE
 #include <urcu-bp.h>
+#include <urcu/rculist.h>
 
-#include <ust/kernelcompat.h>
+#include <ust/core.h>
 #include <ust/marker.h>
 
 #include "usterr.h"
@@ -44,17 +45,17 @@ static const int marker_debug;
  */
 static DEFINE_MUTEX(markers_mutex);
 
-static LIST_HEAD(libs);
+static CDS_LIST_HEAD(libs);
 
 
 void lock_markers(void)
 {
-       mutex_lock(&markers_mutex);
+       pthread_mutex_lock(&markers_mutex);
 }
 
 void unlock_markers(void)
 {
-       mutex_unlock(&markers_mutex);
+       pthread_mutex_unlock(&markers_mutex);
 }
 
 /*
@@ -126,7 +127,7 @@ notrace void __mark_empty_function(const struct marker *mdata,
  * @...:  Variable argument list.
  *
  * Since we do not use "typical" pointer based RCU in the 1 argument case, we
- * need to put a full smp_rmb() in this branch. This is why we do not use
+ * need to put a full cmm_smp_rmb() in this branch. This is why we do not use
  * rcu_dereference() for the pointer read.
  */
 notrace void marker_probe_cb(const struct marker *mdata,
@@ -145,12 +146,12 @@ notrace void marker_probe_cb(const struct marker *mdata,
        if (likely(!ptype)) {
                marker_probe_func *func;
                /* Must read the ptype before ptr. They are not data dependant,
-                * so we put an explicit smp_rmb() here. */
-               smp_rmb();
+                * so we put an explicit cmm_smp_rmb() here. */
+               cmm_smp_rmb();
                func = mdata->single.func;
                /* Must read the ptr before private data. They are not data
-                * dependant, so we put an explicit smp_rmb() here. */
-               smp_rmb();
+                * dependant, so we put an explicit cmm_smp_rmb() here. */
+               cmm_smp_rmb();
                va_start(args, regs);
                func(mdata, mdata->single.probe_private, regs, call_private,
                        mdata->format, &args);
@@ -161,16 +162,16 @@ notrace void marker_probe_cb(const struct marker *mdata,
                /*
                 * Read mdata->ptype before mdata->multi.
                 */
-               smp_rmb();
+               cmm_smp_rmb();
                multi = mdata->multi;
                /*
                 * multi points to an array, therefore accessing the array
                 * depends on reading multi. However, even in this case,
                 * we must insure that the pointer is read _before_ the array
-                * data. Same as rcu_dereference, but we need a full smp_rmb()
-                * in the fast path, so put the explicit barrier here.
+                * data. Same as rcu_dereference, but we need a full cmm_smp_rmb()
+                * in the fast path, so put the explicit cmm_barrier here.
                 */
-               smp_read_barrier_depends();
+               cmm_smp_read_barrier_depends();
                for (i = 0; multi[i].func; i++) {
                        va_start(args, regs);
                        multi[i].func(mdata, multi[i].probe_private,
@@ -201,12 +202,12 @@ static notrace void marker_probe_cb_noarg(const struct marker *mdata,
        if (likely(!ptype)) {
                marker_probe_func *func;
                /* Must read the ptype before ptr. They are not data dependant,
-                * so we put an explicit smp_rmb() here. */
-               smp_rmb();
+                * so we put an explicit cmm_smp_rmb() here. */
+               cmm_smp_rmb();
                func = mdata->single.func;
                /* Must read the ptr before private data. They are not data
-                * dependant, so we put an explicit smp_rmb() here. */
-               smp_rmb();
+                * dependant, so we put an explicit cmm_smp_rmb() here. */
+               cmm_smp_rmb();
                func(mdata, mdata->single.probe_private, regs, call_private,
                        mdata->format, &args);
        } else {
@@ -215,16 +216,16 @@ static notrace void marker_probe_cb_noarg(const struct marker *mdata,
                /*
                 * Read mdata->ptype before mdata->multi.
                 */
-               smp_rmb();
+               cmm_smp_rmb();
                multi = mdata->multi;
                /*
                 * multi points to an array, therefore accessing the array
                 * depends on reading multi. However, even in this case,
                 * we must insure that the pointer is read _before_ the array
-                * data. Same as rcu_dereference, but we need a full smp_rmb()
-                * in the fast path, so put the explicit barrier here.
+                * data. Same as rcu_dereference, but we need a full cmm_smp_rmb()
+                * in the fast path, so put the explicit cmm_barrier here.
                 */
-               smp_read_barrier_depends();
+               cmm_smp_read_barrier_depends();
                for (i = 0; multi[i].func; i++)
                        multi[i].func(mdata, multi[i].probe_private, regs,
                                call_private, mdata->format, &args);
@@ -234,11 +235,11 @@ static notrace void marker_probe_cb_noarg(const struct marker *mdata,
 
 static void free_old_closure(struct rcu_head *head)
 {
-       struct marker_entry *entry = container_of(head,
+       struct marker_entry *entry = _ust_container_of(head,
                struct marker_entry, rcu);
        free(entry->oldptr);
        /* Make sure we free the data before setting the pending flag to 0 */
-       smp_wmb();
+       cmm_smp_wmb();
        entry->rcu_pending = 0;
 }
 
@@ -427,10 +428,10 @@ static struct marker_entry *add_marker(const char *channel, const char *name,
                }
        }
        /*
-        * Using malloc here to allocate a variable length element. Could
+        * Using zmalloc here to allocate a variable length element. Could
         * cause some memory fragmentation if overused.
         */
-       e = malloc(sizeof(struct marker_entry)
+       e = zmalloc(sizeof(struct marker_entry)
                    + channel_len + name_len + format_len);
        if (!e)
                return ERR_PTR(-ENOMEM);
@@ -438,7 +439,7 @@ static struct marker_entry *add_marker(const char *channel, const char *name,
        e->name = &e->channel[channel_len];
        memcpy(e->name, name, name_len);
        if (format) {
-               e->format = &e->name[channel_len + name_len];
+               e->format = &e->name[name_len];
                memcpy(e->format, format, format_len);
                if (strcmp(e->format, MARK_NOARGS) == 0)
                        e->call = marker_probe_cb_noarg;
@@ -496,7 +497,7 @@ static int remove_marker(const char *channel, const char *name)
        WARN_ON(ret);
        /* Make sure the call_rcu has been executed */
 //ust//        if (e->rcu_pending)
-//ust//                rcu_barrier_sched();
+//ust//                rcu_cmm_barrier_sched();
        free(e);
        return 0;
 }
@@ -528,7 +529,7 @@ static int set_marker(struct marker_entry *entry, struct marker *elem,
 
        if (entry->format) {
                if (strcmp(entry->format, elem->format) != 0) {
-                       DBG("Format mismatch for probe %s (%s), marker (%s)",
+                       ERR("Format mismatch for probe %s (%s), marker (%s)",
                                entry->name,
                                entry->format,
                                elem->format);
@@ -562,7 +563,7 @@ static int set_marker(struct marker_entry *entry, struct marker *elem,
         * Make sure the private data is valid when we update the
         * single probe ptr.
         */
-       smp_wmb();
+       cmm_smp_wmb();
        elem->single.func = entry->single.func;
        /*
         * We also make sure that the new probe callbacks array is consistent
@@ -573,39 +574,39 @@ static int set_marker(struct marker_entry *entry, struct marker *elem,
         * Update the function or multi probe array pointer before setting the
         * ptype.
         */
-       smp_wmb();
+       cmm_smp_wmb();
        elem->ptype = entry->ptype;
 
-//ust//        if (elem->tp_name && (active ^ _imv_read(elem->state))) {
-//ust//                WARN_ON(!elem->tp_cb);
-//ust//                /*
-//ust//                 * It is ok to directly call the probe registration because type
-//ust//                 * checking has been done in the __trace_mark_tp() macro.
-//ust//                 */
-//ust//
-//ust//                if (active) {
-//ust//                        /*
-//ust//                         * try_module_get should always succeed because we hold
-//ust//                         * markers_mutex to get the tp_cb address.
-//ust//                         */
+       if (elem->tp_name && (active ^ _imv_read(elem->state))) {
+               WARN_ON(!elem->tp_cb);
+               /*
+                * It is ok to directly call the probe registration because type
+                * checking has been done in the __trace_mark_tp() macro.
+                */
+
+               if (active) {
+                       /*
+                        * try_module_get should always succeed because we hold
+                        * markers_mutex to get the tp_cb address.
+                        */
 //ust//                        ret = try_module_get(__module_text_address(
 //ust//                                (unsigned long)elem->tp_cb));
 //ust//                        BUG_ON(!ret);
-//ust//                        ret = tracepoint_probe_register_noupdate(
-//ust//                                elem->tp_name,
-//ust//                                elem->tp_cb);
-//ust//                } else {
-//ust//                        ret = tracepoint_probe_unregister_noupdate(
-//ust//                                elem->tp_name,
-//ust//                                elem->tp_cb);
-//ust//                        /*
-//ust//                         * tracepoint_probe_update_all() must be called
-//ust//                         * before the module containing tp_cb is unloaded.
-//ust//                         */
+                       ret = tracepoint_probe_register_noupdate(
+                               elem->tp_name,
+                               elem->tp_cb, NULL);
+               } else {
+                       ret = tracepoint_probe_unregister_noupdate(
+                               elem->tp_name,
+                               elem->tp_cb, NULL);
+                       /*
+                        * tracepoint_probe_update_all() must be called
+                        * before the module containing tp_cb is unloaded.
+                        */
 //ust//                        module_put(__module_text_address(
 //ust//                                (unsigned long)elem->tp_cb));
-//ust//                }
-//ust//        }
+               }
+       }
        elem->state__imv = active;
 
        return ret;
@@ -619,28 +620,28 @@ static int set_marker(struct marker_entry *entry, struct marker *elem,
  */
 static void disable_marker(struct marker *elem)
 {
-//ust//        int ret;
-//ust//
-//ust//        /* leave "call" as is. It is known statically. */
-//ust//        if (elem->tp_name && _imv_read(elem->state)) {
-//ust//                WARN_ON(!elem->tp_cb);
-//ust//                /*
-//ust//                 * It is ok to directly call the probe registration because type
-//ust//                 * checking has been done in the __trace_mark_tp() macro.
-//ust//                 */
-//ust//                ret = tracepoint_probe_unregister_noupdate(elem->tp_name,
-//ust//                        elem->tp_cb);
-//ust//                WARN_ON(ret);
-//ust//                /*
-//ust//                 * tracepoint_probe_update_all() must be called
-//ust//                 * before the module containing tp_cb is unloaded.
-//ust//                 */
+       int ret;
+
+       /* leave "call" as is. It is known statically. */
+       if (elem->tp_name && _imv_read(elem->state)) {
+               WARN_ON(!elem->tp_cb);
+               /*
+                * It is ok to directly call the probe registration because type
+                * checking has been done in the __trace_mark_tp() macro.
+                */
+               ret = tracepoint_probe_unregister_noupdate(elem->tp_name,
+                       elem->tp_cb, NULL);
+               WARN_ON(ret);
+               /*
+                * tracepoint_probe_update_all() must be called
+                * before the module containing tp_cb is unloaded.
+                */
 //ust//                module_put(__module_text_address((unsigned long)elem->tp_cb));
-//ust//        }
+       }
        elem->state__imv = 0;
        elem->single.func = __mark_empty_function;
        /* Update the function before setting the ptype */
-       smp_wmb();
+       cmm_smp_wmb();
        elem->ptype = 0;        /* single probe */
        /*
         * Leave the private data and channel_id/event_id there, because removal
@@ -660,9 +661,9 @@ int is_marker_enabled(const char *channel, const char *name)
 {
        struct marker_entry *entry;
 
-       mutex_lock(&markers_mutex);
+       pthread_mutex_lock(&markers_mutex);
        entry = get_marker(channel, name);
-       mutex_unlock(&markers_mutex);
+       pthread_mutex_unlock(&markers_mutex);
 
        return entry && !!entry->refcount;
 }
@@ -680,7 +681,7 @@ void marker_update_probe_range(struct marker *begin,
        struct marker *iter;
        struct marker_entry *mark_entry;
 
-       mutex_lock(&markers_mutex);
+       pthread_mutex_lock(&markers_mutex);
        for (iter = begin; iter < end; iter++) {
                mark_entry = get_marker(iter->channel, iter->name);
                if (mark_entry) {
@@ -706,7 +707,7 @@ void marker_update_probe_range(struct marker *begin,
                        disable_marker(iter);
                }
        }
-       mutex_unlock(&markers_mutex);
+       pthread_mutex_unlock(&markers_mutex);
 }
 
 static void lib_update_markers(void)
@@ -714,11 +715,11 @@ static void lib_update_markers(void)
        struct lib *lib;
 
        /* FIXME: we should probably take a mutex here on libs */
-//ust//        mutex_lock(&module_mutex);
-       list_for_each_entry(lib, &libs, list)
+//ust//        pthread_mutex_lock(&module_mutex);
+       cds_list_for_each_entry(lib, &libs, list)
                marker_update_probe_range(lib->markers_start,
                                lib->markers_start + lib->markers_count);
-//ust//        mutex_unlock(&module_mutex);
+//ust//        pthread_mutex_unlock(&module_mutex);
 }
 
 /*
@@ -745,7 +746,7 @@ static void marker_update_probes(void)
        /* Markers in modules. */
 //ust//        module_update_markers();
        lib_update_markers();
-//ust//        tracepoint_probe_update_all();
+       tracepoint_probe_update_all();
        /* Update immediate values */
        core_imv_update();
 //ust//        module_imv_update(); /* FIXME: need to port for libs? */
@@ -773,7 +774,7 @@ int marker_probe_register(const char *channel, const char *name,
        struct marker_probe_closure *old;
        int first_probe = 0;
 
-       mutex_lock(&markers_mutex);
+       pthread_mutex_lock(&markers_mutex);
        entry = get_marker(channel, name);
        if (!entry) {
                first_probe = 1;
@@ -815,7 +816,7 @@ int marker_probe_register(const char *channel, const char *name,
         * make sure it's executed now.
         */
 //ust//        if (entry->rcu_pending)
-//ust//                rcu_barrier_sched();
+//ust//                rcu_cmm_barrier_sched();
        old = marker_entry_add_probe(entry, probe, probe_private);
        if (IS_ERR(old)) {
                ret = PTR_ERR(old);
@@ -824,21 +825,21 @@ int marker_probe_register(const char *channel, const char *name,
                else
                        goto end;
        }
-       mutex_unlock(&markers_mutex);
+       pthread_mutex_unlock(&markers_mutex);
 
        /* Activate marker if necessary */
        marker_update_probes();
 
-       mutex_lock(&markers_mutex);
+       pthread_mutex_lock(&markers_mutex);
        entry = get_marker(channel, name);
        if (!entry)
                goto end;
 //ust//        if (entry->rcu_pending)
-//ust//                rcu_barrier_sched();
+//ust//                rcu_cmm_barrier_sched();
        entry->oldptr = old;
        entry->rcu_pending = 1;
        /* write rcu_pending before calling the RCU callback */
-       smp_wmb();
+       cmm_smp_wmb();
 //ust//        call_rcu_sched(&entry->rcu, free_old_closure);
        synchronize_rcu(); free_old_closure(&entry->rcu);
        goto end;
@@ -850,7 +851,7 @@ error_remove_marker:
        ret_err = remove_marker(channel, name);
        WARN_ON(ret_err);
 end:
-       mutex_unlock(&markers_mutex);
+       pthread_mutex_unlock(&markers_mutex);
        return ret;
 }
 //ust// EXPORT_SYMBOL_GPL(marker_probe_register);
@@ -875,33 +876,33 @@ int marker_probe_unregister(const char *channel, const char *name,
        struct marker_probe_closure *old;
        int ret = -ENOENT;
 
-       mutex_lock(&markers_mutex);
+       pthread_mutex_lock(&markers_mutex);
        entry = get_marker(channel, name);
        if (!entry)
                goto end;
 //ust//        if (entry->rcu_pending)
-//ust//                rcu_barrier_sched();
+//ust//                rcu_cmm_barrier_sched();
        old = marker_entry_remove_probe(entry, probe, probe_private);
-       mutex_unlock(&markers_mutex);
+       pthread_mutex_unlock(&markers_mutex);
 
        marker_update_probes();
 
-       mutex_lock(&markers_mutex);
+       pthread_mutex_lock(&markers_mutex);
        entry = get_marker(channel, name);
        if (!entry)
                goto end;
 //ust//        if (entry->rcu_pending)
-//ust//                rcu_barrier_sched();
+//ust//                rcu_cmm_barrier_sched();
        entry->oldptr = old;
        entry->rcu_pending = 1;
        /* write rcu_pending before calling the RCU callback */
-       smp_wmb();
+       cmm_smp_wmb();
 //ust//        call_rcu_sched(&entry->rcu, free_old_closure);
        synchronize_rcu(); free_old_closure(&entry->rcu);
        remove_marker(channel, name);   /* Ignore busy error message */
        ret = 0;
 end:
-       mutex_unlock(&markers_mutex);
+       pthread_mutex_unlock(&markers_mutex);
        return ret;
 }
 //ust// EXPORT_SYMBOL_GPL(marker_probe_unregister);
@@ -958,37 +959,37 @@ int marker_probe_unregister_private_data(marker_probe_func *probe,
        struct marker_probe_closure *old;
        char *channel = NULL, *name = NULL;
 
-       mutex_lock(&markers_mutex);
+       pthread_mutex_lock(&markers_mutex);
        entry = get_marker_from_private_data(probe, probe_private);
        if (!entry) {
                ret = -ENOENT;
                goto end;
        }
 //ust//        if (entry->rcu_pending)
-//ust//                rcu_barrier_sched();
+//ust//                rcu_cmm_barrier_sched();
        old = marker_entry_remove_probe(entry, NULL, probe_private);
        channel = strdup(entry->channel);
        name = strdup(entry->name);
-       mutex_unlock(&markers_mutex);
+       pthread_mutex_unlock(&markers_mutex);
 
        marker_update_probes();
 
-       mutex_lock(&markers_mutex);
+       pthread_mutex_lock(&markers_mutex);
        entry = get_marker(channel, name);
        if (!entry)
                goto end;
 //ust//        if (entry->rcu_pending)
-//ust//                rcu_barrier_sched();
+//ust//                rcu_cmm_barrier_sched();
        entry->oldptr = old;
        entry->rcu_pending = 1;
        /* write rcu_pending before calling the RCU callback */
-       smp_wmb();
+       cmm_smp_wmb();
 //ust//        call_rcu_sched(&entry->rcu, free_old_closure);
        synchronize_rcu(); free_old_closure(&entry->rcu);
        /* Ignore busy error message */
        remove_marker(channel, name);
 end:
-       mutex_unlock(&markers_mutex);
+       pthread_mutex_unlock(&markers_mutex);
        free(channel);
        free(name);
        return ret;
@@ -1084,8 +1085,8 @@ int lib_get_iter_markers(struct marker_iter *iter)
        struct lib *iter_lib;
        int found = 0;
 
-//ust//        mutex_lock(&module_mutex);
-       list_for_each_entry(iter_lib, &libs, list) {
+//ust//        pthread_mutex_lock(&module_mutex);
+       cds_list_for_each_entry(iter_lib, &libs, list) {
                if (iter_lib < iter->lib)
                        continue;
                else if (iter_lib > iter->lib)
@@ -1098,7 +1099,7 @@ int lib_get_iter_markers(struct marker_iter *iter)
                        break;
                }
        }
-//ust//        mutex_unlock(&module_mutex);
+//ust//        pthread_mutex_unlock(&module_mutex);
        return found;
 }
 
@@ -1202,8 +1203,8 @@ static void free_user_marker(char __user *state, struct hlist_head *head)
 //ust//        struct hlist_node *pos;
 //ust//        struct marker_entry *entry;
 //ust// 
-//ust//        mutex_lock(&markers_mutex);
-//ust//        mutex_lock(&current->group_leader->user_markers_mutex);
+//ust//        pthread_mutex_lock(&markers_mutex);
+//ust//        pthread_mutex_lock(&current->group_leader->user_markers_mutex);
 //ust//        if (strcmp(current->comm, "testprog") == 0)
 //ust//                DBG("do update pending for testprog");
 //ust//        hlist_for_each_entry(umark, pos,
@@ -1230,8 +1231,8 @@ static void free_user_marker(char __user *state, struct hlist_head *head)
 //ust//                }
 //ust//        }
 //ust//        clear_thread_flag(TIF_MARKER_PENDING);
-//ust//        mutex_unlock(&current->group_leader->user_markers_mutex);
-//ust//        mutex_unlock(&markers_mutex);
+//ust//        pthread_mutex_unlock(&current->group_leader->user_markers_mutex);
+//ust//        pthread_mutex_unlock(&markers_mutex);
 //ust// }
 
 /*
@@ -1245,15 +1246,15 @@ void exit_user_markers(struct task_struct *p)
        struct hlist_node *pos, *n;
 
        if (thread_group_leader(p)) {
-               mutex_lock(&markers_mutex);
-               mutex_lock(&p->user_markers_mutex);
+               pthread_mutex_lock(&markers_mutex);
+               pthread_mutex_lock(&p->user_markers_mutex);
                hlist_for_each_entry_safe(umark, pos, n, &p->user_markers,
                        hlist)
                    free(umark);
                INIT_HLIST_HEAD(&p->user_markers);
                p->user_markers_sequence++;
-               mutex_unlock(&p->user_markers_mutex);
-               mutex_unlock(&markers_mutex);
+               pthread_mutex_unlock(&p->user_markers_mutex);
+               pthread_mutex_unlock(&markers_mutex);
        }
 }
 
@@ -1261,9 +1262,9 @@ int is_marker_enabled(const char *channel, const char *name)
 {
        struct marker_entry *entry;
 
-       mutex_lock(&markers_mutex);
+       pthread_mutex_lock(&markers_mutex);
        entry = get_marker(channel, name);
-       mutex_unlock(&markers_mutex);
+       pthread_mutex_unlock(&markers_mutex);
 
        return entry && !!entry->refcount;
 }
@@ -1309,7 +1310,7 @@ void ltt_dump_marker_state(struct ust_trace *trace)
        struct hlist_node *node;
        unsigned int i;
 
-       mutex_lock(&markers_mutex);
+       pthread_mutex_lock(&markers_mutex);
        call_data.trace = trace;
        call_data.serializer = NULL;
 
@@ -1337,7 +1338,7 @@ void ltt_dump_marker_state(struct ust_trace *trace)
                                        entry->format);
                }
        }
-       mutex_unlock(&markers_mutex);
+       pthread_mutex_unlock(&markers_mutex);
 }
 //ust// EXPORT_SYMBOL_GPL(ltt_dump_marker_state);
 
@@ -1361,16 +1362,15 @@ static void new_markers(struct marker *start, struct marker *end)
 int marker_register_lib(struct marker *markers_start, int markers_count)
 {
        struct lib *pl;
-       struct marker_addr *addr;
 
-       pl = (struct lib *) malloc(sizeof(struct lib));
+       pl = (struct lib *) zmalloc(sizeof(struct lib));
 
        pl->markers_start = markers_start;
        pl->markers_count = markers_count;
 
        /* FIXME: maybe protect this with its own mutex? */
        lock_markers();
-       list_add(&pl->list, &libs);
+       cds_list_add(&pl->list, &libs);
        unlock_markers();
 
        new_markers(markers_start, markers_start + markers_count);
@@ -1383,11 +1383,28 @@ int marker_register_lib(struct marker *markers_start, int markers_count)
        return 0;
 }
 
-int marker_unregister_lib(struct marker *markers_start, int markers_count)
+int marker_unregister_lib(struct marker *markers_start)
 {
+       struct lib *lib;
+
        /*FIXME: implement; but before implementing, marker_register_lib must
           have appropriate locking. */
 
+       lock_markers();
+
+       /* FIXME: we should probably take a mutex here on libs */
+//ust//        pthread_mutex_lock(&module_mutex);
+       cds_list_for_each_entry(lib, &libs, list) {
+               if(lib->markers_start == markers_start) {
+                       struct lib *lib2free = lib;
+                       cds_list_del(&lib->list);
+                       free(lib2free);
+                       break;
+               }
+       }
+
+       unlock_markers();
+
        return 0;
 }
 
@@ -1397,7 +1414,11 @@ void __attribute__((constructor)) init_markers(void)
 {
        if(!initialized) {
                marker_register_lib(__start___markers, (((long)__stop___markers)-((long)__start___markers))/sizeof(struct marker));
-               //DBG("markers_start: %p, markers_stop: %p\n", __start___markers, __stop___markers);
                initialized = 1;
        }
 }
+
+void __attribute__((constructor)) destroy_markers(void)
+{
+       marker_unregister_lib(__start___markers);
+}
This page took 0.036143 seconds and 4 git commands to generate.