projects
/
ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix freeing of channels and buffers in buffers.c v2
[ust.git]
/
libust
/
tracer.c
diff --git
a/libust/tracer.c
b/libust/tracer.c
index ecf403adfeee3e6ea580fe8b3ad5f998de295c90..435c22dda3c8a2a3b3f45bd7e1fc30a5f0c24ce3 100644
(file)
--- a/
libust/tracer.c
+++ b/
libust/tracer.c
@@
-324,7
+324,7
@@
struct ust_trace *_ltt_trace_find_setup(const char *trace_name)
* ltt_release_transport - Release an LTT transport
* @kref : reference count on the transport
*/
* ltt_release_transport - Release an LTT transport
* @kref : reference count on the transport
*/
-void ltt_release_transport(struct
kref *k
ref)
+void ltt_release_transport(struct
urcu_ref *urcu_
ref)
{
//ust// struct ust_trace *trace = container_of(kref,
//ust// struct ust_trace, ltt_transport_kref);
{
//ust// struct ust_trace *trace = container_of(kref,
//ust// struct ust_trace, ltt_transport_kref);
@@
-335,10
+335,10
@@
void ltt_release_transport(struct kref *kref)
* ltt_release_trace - Release a LTT trace
* @kref : reference count on the trace
*/
* ltt_release_trace - Release a LTT trace
* @kref : reference count on the trace
*/
-void ltt_release_trace(struct
kref *k
ref)
+void ltt_release_trace(struct
urcu_ref *urcu_
ref)
{
{
- struct ust_trace *trace = _ust_container_of(
k
ref,
- struct ust_trace,
k
ref);
+ struct ust_trace *trace = _ust_container_of(
urcu_
ref,
+ struct ust_trace,
urcu_
ref);
ltt_channels_trace_free(trace->channels);
free(trace);
}
ltt_channels_trace_free(trace->channels);
free(trace);
}
@@
-640,9
+640,9
@@
int ltt_trace_alloc(const char *trace_name)
goto traces_error;
}
goto traces_error;
}
-
kref_init(&trace->k
ref);
-
kref_init(&trace->ltt_transport_k
ref);
-//ust// init_waitqueue_head(&trace->
k
ref_wq);
+
urcu_ref_init(&trace->urcu_
ref);
+
urcu_ref_init(&trace->ltt_transport_urcu_
ref);
+//ust// init_waitqueue_head(&trace->
urcu_
ref_wq);
trace->active = 0;
//ust// get_trace_clock();
trace->freq_scale = trace_clock_freq_scale();
trace->active = 0;
//ust// get_trace_clock();
trace->freq_scale = trace_clock_freq_scale();
@@
-795,9
+795,6
@@
static void __ltt_trace_destroy(struct ust_trace *trace, int drop)
}
}
}
}
- return; /* FIXME: temporary for ust */
-//ust// flush_scheduled_work();
-
/*
* The currently destroyed trace is not in the trace list anymore,
* so it's safe to call the async wakeup ourself. It will deliver
/*
* The currently destroyed trace is not in the trace list anymore,
* so it's safe to call the async wakeup ourself. It will deliver
@@
-811,7
+808,7
@@
static void __ltt_trace_destroy(struct ust_trace *trace, int drop)
trace->ops->remove_channel(chan);
}
trace->ops->remove_channel(chan);
}
-
kref_put(&trace->ltt_transport_k
ref, ltt_release_transport);
+
urcu_ref_put(&trace->ltt_transport_urcu_
ref, ltt_release_transport);
//ust// module_put(trace->transport->owner);
//ust// module_put(trace->transport->owner);
@@
-824,7
+821,7
@@
static void __ltt_trace_destroy(struct ust_trace *trace, int drop)
//ust// __wait_event_interruptible(trace->kref_wq,
//ust// (atomic_read(&trace->kref.refcount) == 1), ret);
//ust// }
//ust// __wait_event_interruptible(trace->kref_wq,
//ust// (atomic_read(&trace->kref.refcount) == 1), ret);
//ust// }
-
kref_put(&trace->k
ref, ltt_release_trace);
+
urcu_ref_put(&trace->urcu_
ref, ltt_release_trace);
}
int ltt_trace_destroy(const char *trace_name, int drop)
}
int ltt_trace_destroy(const char *trace_name, int drop)
This page took
0.023259 seconds
and
4
git commands to generate.