4 * (C) Copyright 2005-2008 -
5 * Mathieu Desnoyers (mathieu.desnoyers@polymtl.ca)
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 * Karim Yaghmour (karim@opersys.com)
23 * Tom Zanussi (zanussi@us.ibm.com)
24 * Bob Wisniewski (bob@watson.ibm.com)
26 * Bob Wisniewski (bob@watson.ibm.com)
29 * 22/09/06, Move to the marker/probes mechanism.
30 * 19/10/05, Complete lockless mechanism.
31 * 27/05/05, Modular redesign and rewrite.
35 #include <urcu/rculist.h>
37 #include <ust/clock.h>
39 #include "tracercore.h"
43 //ust// static void async_wakeup(unsigned long data);
45 //ust// static DEFINE_TIMER(ltt_async_wakeup_timer, async_wakeup, 0, 0);
47 /* Default callbacks for modules */
48 notrace
int ltt_filter_control_default(enum ltt_filter_control_msg msg
,
49 struct ust_trace
*trace
)
54 int ltt_statedump_default(struct ust_trace
*trace
)
59 /* Callbacks for registered modules */
61 int (*ltt_filter_control_functor
)
62 (enum ltt_filter_control_msg msg
, struct ust_trace
*trace
) =
63 ltt_filter_control_default
;
64 struct module
*ltt_filter_control_owner
;
66 /* These function pointers are protected by a trace activation check */
67 struct module
*ltt_run_filter_owner
;
68 int (*ltt_statedump_functor
)(struct ust_trace
*trace
) =
69 ltt_statedump_default
;
70 struct module
*ltt_statedump_owner
;
72 struct chan_info_struct
{
74 unsigned int def_subbufsize
;
75 unsigned int def_subbufcount
;
77 [LTT_CHANNEL_METADATA
] = {
79 LTT_DEFAULT_SUBBUF_SIZE_LOW
,
80 LTT_DEFAULT_N_SUBBUFS_LOW
,
84 LTT_DEFAULT_SUBBUF_SIZE_HIGH
,
85 LTT_DEFAULT_N_SUBBUFS_HIGH
,
89 static enum ltt_channels
get_channel_type_from_name(const char *name
)
94 return LTT_CHANNEL_UST
;
96 for (i
= 0; i
< ARRAY_SIZE(chan_infos
); i
++)
97 if (chan_infos
[i
].name
&& !strcmp(name
, chan_infos
[i
].name
))
98 return (enum ltt_channels
)i
;
100 return LTT_CHANNEL_UST
;
104 * ltt_module_register - LTT module registration
106 * @function: callback to register
107 * @owner: module which owns the callback
109 * The module calling this registration function must ensure that no
110 * trap-inducing code will be executed by "function". E.g. vmalloc_sync_all()
111 * must be called between a vmalloc and the moment the memory is made visible to
112 * "function". This registration acts as a vmalloc_sync_all. Therefore, only if
113 * the module allocates virtual memory after its registration must it
114 * synchronize the TLBs.
116 //ust// int ltt_module_register(enum ltt_module_function name, void *function,
117 //ust// struct module *owner)
122 //ust// * Make sure no page fault can be triggered by the module about to be
123 //ust// * registered. We deal with this here so we don't have to call
124 //ust// * vmalloc_sync_all() in each module's init.
126 //ust// vmalloc_sync_all();
128 //ust// switch (name) {
129 //ust// case LTT_FUNCTION_RUN_FILTER:
130 //ust// if (ltt_run_filter_owner != NULL) {
131 //ust// ret = -EEXIST;
134 //ust// ltt_filter_register((ltt_run_filter_functor)function);
135 //ust// ltt_run_filter_owner = owner;
137 //ust// case LTT_FUNCTION_FILTER_CONTROL:
138 //ust// if (ltt_filter_control_owner != NULL) {
139 //ust// ret = -EEXIST;
142 //ust// ltt_filter_control_functor =
143 //ust// (int (*)(enum ltt_filter_control_msg,
144 //ust// struct ust_trace *))function;
145 //ust// ltt_filter_control_owner = owner;
147 //ust// case LTT_FUNCTION_STATEDUMP:
148 //ust// if (ltt_statedump_owner != NULL) {
149 //ust// ret = -EEXIST;
152 //ust// ltt_statedump_functor =
153 //ust// (int (*)(struct ust_trace *))function;
154 //ust// ltt_statedump_owner = owner;
164 * ltt_module_unregister - LTT module unregistration
167 //ust// void ltt_module_unregister(enum ltt_module_function name)
169 //ust// switch (name) {
170 //ust// case LTT_FUNCTION_RUN_FILTER:
171 //ust// ltt_filter_unregister();
172 //ust// ltt_run_filter_owner = NULL;
173 //ust// /* Wait for preempt sections to finish */
174 //ust// synchronize_sched();
176 //ust// case LTT_FUNCTION_FILTER_CONTROL:
177 //ust// ltt_filter_control_functor = ltt_filter_control_default;
178 //ust// ltt_filter_control_owner = NULL;
180 //ust// case LTT_FUNCTION_STATEDUMP:
181 //ust// ltt_statedump_functor = ltt_statedump_default;
182 //ust// ltt_statedump_owner = NULL;
188 static LIST_HEAD(ltt_transport_list
);
191 * ltt_transport_register - LTT transport registration
192 * @transport: transport structure
194 * Registers a transport which can be used as output to extract the data out of
195 * LTTng. The module calling this registration function must ensure that no
196 * trap-inducing code will be executed by the transport functions. E.g.
197 * vmalloc_sync_all() must be called between a vmalloc and the moment the memory
198 * is made visible to the transport function. This registration acts as a
199 * vmalloc_sync_all. Therefore, only if the module allocates virtual memory
200 * after its registration must it synchronize the TLBs.
202 void ltt_transport_register(struct ltt_transport
*transport
)
205 * Make sure no page fault can be triggered by the module about to be
206 * registered. We deal with this here so we don't have to call
207 * vmalloc_sync_all() in each module's init.
209 //ust// vmalloc_sync_all();
212 list_add_tail(&transport
->node
, <t_transport_list
);
217 * ltt_transport_unregister - LTT transport unregistration
218 * @transport: transport structure
220 void ltt_transport_unregister(struct ltt_transport
*transport
)
223 list_del(&transport
->node
);
227 static inline int is_channel_overwrite(enum ltt_channels chan
,
228 enum trace_mode mode
)
231 case LTT_TRACE_NORMAL
:
233 case LTT_TRACE_FLIGHT
:
235 case LTT_CHANNEL_METADATA
:
240 case LTT_TRACE_HYBRID
:
242 case LTT_CHANNEL_METADATA
:
252 static void trace_async_wakeup(struct ust_trace
*trace
)
255 struct ust_channel
*chan
;
257 /* Must check each channel for pending read wakeup */
258 for (i
= 0; i
< trace
->nr_channels
; i
++) {
259 chan
= &trace
->channels
[i
];
261 trace
->ops
->wakeup_channel(chan
);
265 //ust// /* Timer to send async wakeups to the readers */
266 //ust// static void async_wakeup(unsigned long data)
268 //ust// struct ust_trace *trace;
271 //ust// * PREEMPT_RT does not allow spinlocks to be taken within preempt
272 //ust// * disable sections (spinlock taken in wake_up). However, mainline won't
273 //ust// * allow mutex to be taken in interrupt context. Ugly.
274 //ust// * A proper way to do this would be to turn the timer into a
275 //ust// * periodically woken up thread, but it adds to the footprint.
277 //ust// #ifndef CONFIG_PREEMPT_RT
278 //ust// rcu_read_lock_sched();
280 //ust// ltt_lock_traces();
282 //ust// list_for_each_entry_rcu(trace, <t_traces.head, list) {
283 //ust// trace_async_wakeup(trace);
285 //ust// #ifndef CONFIG_PREEMPT_RT
286 //ust// rcu_read_unlock_sched();
288 //ust// ltt_unlock_traces();
291 //ust// mod_timer(<t_async_wakeup_timer, jiffies + LTT_PERCPU_TIMER_INTERVAL);
295 * _ltt_trace_find - find a trace by given name.
296 * trace_name: trace name
298 * Returns a pointer to the trace structure, NULL if not found.
300 struct ust_trace
*_ltt_trace_find(const char *trace_name
)
302 struct ust_trace
*trace
;
304 list_for_each_entry(trace
, <t_traces
.head
, list
)
305 if (!strncmp(trace
->trace_name
, trace_name
, NAME_MAX
))
311 /* _ltt_trace_find_setup :
312 * find a trace in setup list by given name.
314 * Returns a pointer to the trace structure, NULL if not found.
316 struct ust_trace
*_ltt_trace_find_setup(const char *trace_name
)
318 struct ust_trace
*trace
;
320 list_for_each_entry(trace
, <t_traces
.setup_head
, list
)
321 if (!strncmp(trace
->trace_name
, trace_name
, NAME_MAX
))
328 * ltt_release_transport - Release an LTT transport
329 * @kref : reference count on the transport
331 void ltt_release_transport(struct kref
*kref
)
333 //ust// struct ust_trace *trace = container_of(kref,
334 //ust// struct ust_trace, ltt_transport_kref);
335 //ust// trace->ops->remove_dirs(trace);
339 * ltt_release_trace - Release a LTT trace
340 * @kref : reference count on the trace
342 void ltt_release_trace(struct kref
*kref
)
344 struct ust_trace
*trace
= container_of(kref
,
345 struct ust_trace
, kref
);
346 ltt_channels_trace_free(trace
->channels
);
350 static inline void prepare_chan_size_num(unsigned int *subbuf_size
,
351 unsigned int *n_subbufs
)
353 /* Make sure the subbuffer size is larger than a page */
354 *subbuf_size
= max_t(unsigned int, *subbuf_size
, PAGE_SIZE
);
356 /* round to next power of 2 */
357 *subbuf_size
= 1 << get_count_order(*subbuf_size
);
358 *n_subbufs
= 1 << get_count_order(*n_subbufs
);
360 /* Subbuf size and number must both be power of two */
361 WARN_ON(hweight32(*subbuf_size
) != 1);
362 WARN_ON(hweight32(*n_subbufs
) != 1);
365 int _ltt_trace_setup(const char *trace_name
)
368 struct ust_trace
*new_trace
= NULL
;
371 enum ltt_channels chantype
;
373 if (_ltt_trace_find_setup(trace_name
)) {
374 ERR("Trace name %s already used", trace_name
);
379 if (_ltt_trace_find(trace_name
)) {
380 ERR("Trace name %s already used", trace_name
);
385 new_trace
= zmalloc(sizeof(struct ust_trace
));
387 ERR("Unable to allocate memory for trace %s", trace_name
);
391 strncpy(new_trace
->trace_name
, trace_name
, NAME_MAX
);
392 new_trace
->channels
= ltt_channels_trace_alloc(&new_trace
->nr_channels
,
393 ust_channels_overwrite_by_default
,
394 ust_channels_request_collection_by_default
, 1);
395 if (!new_trace
->channels
) {
396 ERR("Unable to allocate memory for chaninfo %s\n", trace_name
);
402 * Force metadata channel to active, no overwrite.
404 metadata_index
= ltt_channels_get_index_from_name("metadata");
405 WARN_ON(metadata_index
< 0);
406 new_trace
->channels
[metadata_index
].overwrite
= 0;
407 new_trace
->channels
[metadata_index
].active
= 1;
410 * Set hardcoded tracer defaults for some channels
412 for (chan
= 0; chan
< new_trace
->nr_channels
; chan
++) {
413 if (!(new_trace
->channels
[chan
].active
))
416 chantype
= get_channel_type_from_name(
417 ltt_channels_get_name_from_index(chan
));
418 new_trace
->channels
[chan
].subbuf_size
=
419 chan_infos
[chantype
].def_subbufsize
;
420 new_trace
->channels
[chan
].subbuf_cnt
=
421 chan_infos
[chantype
].def_subbufcount
;
424 list_add(&new_trace
->list
, <t_traces
.setup_head
);
434 int ltt_trace_setup(const char *trace_name
)
438 ret
= _ltt_trace_setup(trace_name
);
443 /* must be called from within a traces lock. */
444 static void _ltt_trace_free(struct ust_trace
*trace
)
446 list_del(&trace
->list
);
450 int ltt_trace_set_type(const char *trace_name
, const char *trace_type
)
453 struct ust_trace
*trace
;
454 struct ltt_transport
*tran_iter
, *transport
= NULL
;
458 trace
= _ltt_trace_find_setup(trace_name
);
460 ERR("Trace not found %s", trace_name
);
465 list_for_each_entry(tran_iter
, <t_transport_list
, node
) {
466 if (!strcmp(tran_iter
->name
, trace_type
)) {
467 transport
= tran_iter
;
472 ERR("Transport %s is not present", trace_type
);
477 trace
->transport
= transport
;
484 int ltt_trace_set_channel_subbufsize(const char *trace_name
,
485 const char *channel_name
, unsigned int size
)
488 struct ust_trace
*trace
;
493 trace
= _ltt_trace_find_setup(trace_name
);
495 ERR("Trace not found %s", trace_name
);
500 index
= ltt_channels_get_index_from_name(channel_name
);
502 ERR("Channel %s not found", channel_name
);
506 trace
->channels
[index
].subbuf_size
= size
;
513 int ltt_trace_set_channel_subbufcount(const char *trace_name
,
514 const char *channel_name
, unsigned int cnt
)
517 struct ust_trace
*trace
;
522 trace
= _ltt_trace_find_setup(trace_name
);
524 ERR("Trace not found %s", trace_name
);
529 index
= ltt_channels_get_index_from_name(channel_name
);
531 ERR("Channel %s not found", channel_name
);
535 trace
->channels
[index
].subbuf_cnt
= cnt
;
542 int ltt_trace_set_channel_enable(const char *trace_name
,
543 const char *channel_name
, unsigned int enable
)
546 struct ust_trace
*trace
;
551 trace
= _ltt_trace_find_setup(trace_name
);
553 ERR("Trace not found %s", trace_name
);
559 * Datas in metadata channel(marker info) is necessary to be able to
560 * read the trace, we always enable this channel.
562 if (!enable
&& !strcmp(channel_name
, "metadata")) {
563 ERR("Trying to disable metadata channel");
568 index
= ltt_channels_get_index_from_name(channel_name
);
570 ERR("Channel %s not found", channel_name
);
575 trace
->channels
[index
].active
= enable
;
582 int ltt_trace_set_channel_overwrite(const char *trace_name
,
583 const char *channel_name
, unsigned int overwrite
)
586 struct ust_trace
*trace
;
591 trace
= _ltt_trace_find_setup(trace_name
);
593 ERR("Trace not found %s", trace_name
);
599 * Always put the metadata channel in non-overwrite mode :
600 * This is a very low traffic channel and it can't afford to have its
601 * data overwritten : this data (marker info) is necessary to be
602 * able to read the trace.
604 if (overwrite
&& !strcmp(channel_name
, "metadata")) {
605 ERR("Trying to set metadata channel to overwrite mode");
610 index
= ltt_channels_get_index_from_name(channel_name
);
612 ERR("Channel %s not found", channel_name
);
617 trace
->channels
[index
].overwrite
= overwrite
;
624 int ltt_trace_alloc(const char *trace_name
)
627 struct ust_trace
*trace
;
628 unsigned int subbuf_size
, subbuf_cnt
;
629 //ust// unsigned long flags;
631 const char *channel_name
;
635 if (_ltt_trace_find(trace_name
)) { /* Trace already allocated */
640 trace
= _ltt_trace_find_setup(trace_name
);
642 ERR("Trace not found %s", trace_name
);
647 kref_init(&trace
->kref
);
648 kref_init(&trace
->ltt_transport_kref
);
649 //ust// init_waitqueue_head(&trace->kref_wq);
651 //ust// get_trace_clock();
652 trace
->freq_scale
= trace_clock_freq_scale();
654 if (!trace
->transport
) {
655 ERR("Transport is not set");
657 goto transport_error
;
659 //ust// if (!try_module_get(trace->transport->owner)) {
660 //ust// ERR("Can't lock transport module");
661 //ust// err = -ENODEV;
662 //ust// goto transport_error;
664 trace
->ops
= &trace
->transport
->ops
;
666 //ust// err = trace->ops->create_dirs(trace);
668 //ust// ERR("Can't create dir for trace %s", trace_name);
669 //ust// goto dirs_error;
672 //ust// local_irq_save(flags);
673 trace
->start_freq
= trace_clock_frequency();
674 trace
->start_tsc
= trace_clock_read64();
675 gettimeofday(&trace
->start_time
, NULL
); //ust// changed /* FIXME: is this ok? */
676 //ust// local_irq_restore(flags);
678 for (chan
= 0; chan
< trace
->nr_channels
; chan
++) {
679 if (!(trace
->channels
[chan
].active
))
682 channel_name
= ltt_channels_get_name_from_index(chan
);
683 WARN_ON(!channel_name
);
684 subbuf_size
= trace
->channels
[chan
].subbuf_size
;
685 subbuf_cnt
= trace
->channels
[chan
].subbuf_cnt
;
686 prepare_chan_size_num(&subbuf_size
, &subbuf_cnt
);
687 err
= trace
->ops
->create_channel(trace_name
, trace
,
689 &trace
->channels
[chan
],
692 trace
->channels
[chan
].overwrite
);
694 ERR("Cannot create channel %s", channel_name
);
695 goto create_channel_error
;
699 list_del(&trace
->list
);
700 //ust// if (list_empty(<t_traces.head)) {
701 //ust// mod_timer(<t_async_wakeup_timer,
702 //ust// jiffies + LTT_PERCPU_TIMER_INTERVAL);
703 //ust// set_kernel_trace_flag_all_tasks();
705 list_add_rcu(&trace
->list
, <t_traces
.head
);
706 //ust// synchronize_sched();
712 create_channel_error
:
713 for (chan
--; chan
>= 0; chan
--)
714 if (trace
->channels
[chan
].active
)
715 trace
->ops
->remove_channel(&trace
->channels
[chan
]);
718 //ust// module_put(trace->transport->owner);
720 //ust// put_trace_clock();
727 * It is worked as a wrapper for current version of ltt_control.ko.
728 * We will make a new ltt_control based on debugfs, and control each channel's
731 //ust// static int ltt_trace_create(const char *trace_name, const char *trace_type,
732 //ust// enum trace_mode mode,
733 //ust// unsigned int subbuf_size_low, unsigned int n_subbufs_low,
734 //ust// unsigned int subbuf_size_med, unsigned int n_subbufs_med,
735 //ust// unsigned int subbuf_size_high, unsigned int n_subbufs_high)
739 //ust// err = ltt_trace_setup(trace_name);
740 //ust// if (IS_ERR_VALUE(err))
743 //ust// err = ltt_trace_set_type(trace_name, trace_type);
744 //ust// if (IS_ERR_VALUE(err))
747 //ust// err = ltt_trace_alloc(trace_name);
748 //ust// if (IS_ERR_VALUE(err))
754 /* Must be called while sure that trace is in the list. */
755 static int _ltt_trace_destroy(struct ust_trace
*trace
)
764 ERR("Can't destroy trace %s : tracer is active", trace
->trace_name
);
768 /* Everything went fine */
769 list_del_rcu(&trace
->list
);
771 if (list_empty(<t_traces
.head
)) {
772 //ust// clear_kernel_trace_flag_all_tasks();
774 * We stop the asynchronous delivery of reader wakeup, but
775 * we must make one last check for reader wakeups pending
776 * later in __ltt_trace_destroy.
778 //ust// del_timer_sync(<t_async_wakeup_timer);
788 /* Sleepable part of the destroy */
789 static void __ltt_trace_destroy(struct ust_trace
*trace
, int drop
)
792 struct ust_channel
*chan
;
795 for (i
= 0; i
< trace
->nr_channels
; i
++) {
796 chan
= &trace
->channels
[i
];
798 trace
->ops
->finish_channel(chan
);
802 return; /* FIXME: temporary for ust */
803 //ust// flush_scheduled_work();
806 * The currently destroyed trace is not in the trace list anymore,
807 * so it's safe to call the async wakeup ourself. It will deliver
808 * the last subbuffers.
810 trace_async_wakeup(trace
);
812 for (i
= 0; i
< trace
->nr_channels
; i
++) {
813 chan
= &trace
->channels
[i
];
815 trace
->ops
->remove_channel(chan
);
818 kref_put(&trace
->ltt_transport_kref
, ltt_release_transport
);
820 //ust// module_put(trace->transport->owner);
823 * Wait for lttd readers to release the files, therefore making sure
824 * the last subbuffers have been read.
826 //ust// if (atomic_read(&trace->kref.refcount) > 1) {
828 //ust// __wait_event_interruptible(trace->kref_wq,
829 //ust// (atomic_read(&trace->kref.refcount) == 1), ret);
831 kref_put(&trace
->kref
, ltt_release_trace
);
834 int ltt_trace_destroy(const char *trace_name
, int drop
)
837 struct ust_trace
*trace
;
841 trace
= _ltt_trace_find(trace_name
);
843 err
= _ltt_trace_destroy(trace
);
849 __ltt_trace_destroy(trace
, drop
);
850 //ust// put_trace_clock();
855 trace
= _ltt_trace_find_setup(trace_name
);
857 _ltt_trace_free(trace
);
870 /* must be called from within a traces lock. */
871 static int _ltt_trace_start(struct ust_trace
*trace
)
880 DBG("Tracing already active for trace %s", trace
->trace_name
);
881 //ust// if (!try_module_get(ltt_run_filter_owner)) {
882 //ust// err = -ENODEV;
883 //ust// ERR("Cannot lock filter module");
884 //ust// goto get_ltt_run_filter_error;
887 /* Read by trace points without protection : be careful */
888 ltt_traces
.num_active_traces
++;
892 //ust// get_ltt_run_filter_error:
897 int ltt_trace_start(const char *trace_name
)
900 struct ust_trace
*trace
;
904 trace
= _ltt_trace_find(trace_name
);
905 err
= _ltt_trace_start(trace
);
912 * Call the kernel state dump.
913 * Events will be mixed with real kernel events, it's ok.
914 * Notice that there is no protection on the trace : that's exactly
915 * why we iterate on the list and check for trace equality instead of
916 * directly using this trace handle inside the logging function.
919 ltt_dump_marker_state(trace
);
921 //ust// if (!try_module_get(ltt_statedump_owner)) {
922 //ust// err = -ENODEV;
923 //ust// ERR("Cannot lock state dump module");
925 ltt_statedump_functor(trace
);
926 //ust// module_put(ltt_statedump_owner);
937 /* must be called from within traces lock */
938 static int _ltt_trace_stop(struct ust_trace
*trace
)
947 DBG("LTT : Tracing not active for trace %s", trace
->trace_name
);
950 ltt_traces
.num_active_traces
--;
951 //ust// synchronize_sched(); /* Wait for each tracing to be finished */
953 //ust// module_put(ltt_run_filter_owner);
954 /* Everything went fine */
962 int ltt_trace_stop(const char *trace_name
)
965 struct ust_trace
*trace
;
968 trace
= _ltt_trace_find(trace_name
);
969 err
= _ltt_trace_stop(trace
);
975 * ltt_filter_control - Trace filter control in-kernel API
976 * @msg: Action to perform on the filter
977 * @trace_name: Trace on which the action must be done
979 int ltt_filter_control(enum ltt_filter_control_msg msg
, const char *trace_name
)
982 struct ust_trace
*trace
;
984 DBG("ltt_filter_control : trace %s", trace_name
);
986 trace
= _ltt_trace_find(trace_name
);
988 ERR("Trace does not exist. Cannot proxy control request");
992 //ust// if (!try_module_get(ltt_filter_control_owner)) {
993 //ust// err = -ENODEV;
994 //ust// goto get_module_error;
997 case LTT_FILTER_DEFAULT_ACCEPT
:
998 DBG("Proxy filter default accept %s", trace_name
);
999 err
= (*ltt_filter_control_functor
)(msg
, trace
);
1001 case LTT_FILTER_DEFAULT_REJECT
:
1002 DBG("Proxy filter default reject %s", trace_name
);
1003 err
= (*ltt_filter_control_functor
)(msg
, trace
);
1008 //ust// module_put(ltt_filter_control_owner);
1010 //ust// get_module_error:
1012 ltt_unlock_traces();