*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*
* 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.
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-extern struct marker * const __start___markers_ptrs[] __attribute__((visibility("hidden")));
-extern struct marker * const __stop___markers_ptrs[] __attribute__((visibility("hidden")));
+extern struct ust_marker * const __start___ust_marker_ptrs[] __attribute__((visibility("hidden")));
+extern struct ust_marker * const __stop___ust_marker_ptrs[] __attribute__((visibility("hidden")));
- * markers_mutex nests inside module_mutex. Markers mutex protects the builtin
- * and module markers and the hash table.
+ * ust_marker_mutex nests inside module_mutex. ust_marker mutex protects
+ * the builtin and module ust_marker and the hash table.
-#define MARKER_HASH_BITS 6
-#define MARKER_TABLE_SIZE (1 << MARKER_HASH_BITS)
-static struct cds_hlist_head marker_table[MARKER_TABLE_SIZE];
+#define UST_MARKER_HASH_BITS 6
+#define UST_MARKER_TABLE_SIZE (1 << UST_MARKER_HASH_BITS)
+static struct cds_hlist_head ust_marker_table[UST_MARKER_TABLE_SIZE];
- * It is used to make sure every handler has finished using its private data
- * between two consecutive operation (add or remove) on a given marker. It is
- * also used to delay the free of multiple probes array until a quiescent state
- * is reached.
- * marker entries modifications are protected by the markers_mutex.
+ * It is used to make sure every handler has finished using its private
+ * data between two consecutive operation (add or remove) on a given
+ * ust_marker. It is also used to delay the free of multiple probes
+ * array until a quiescent state is reached. ust_marker entries
+ * modifications are protected by the ust_marker_mutex.
- void (*call)(const struct marker *mdata, void *call_private, struct registers *regs, ...);
- struct marker_probe_closure single;
- struct marker_probe_closure *multi;
+ void (*call)(const struct ust_marker *mdata, void *call_private, ...);
+ struct ust_marker_probe_closure single;
+ struct ust_marker_probe_closure *multi;
* @probe_private: probe private data
* @call_private: call site private data
* @fmt: format string
* @...: variable argument list
*
* @probe_private: probe private data
* @call_private: call site private data
* @fmt: format string
* @...: variable argument list
*
- * Empty callback provided as a probe to the markers. By providing this to a
- * disabled marker, we make sure the execution flow is always valid even
- * though the function pointer change and the marker enabling are two distinct
- * operations that modifies the execution flow of preemptible code.
+ * Empty callback provided as a probe to the ust_marker. By providing
+ * this to a disabled ust_marker, we make sure the execution flow is
+ * always valid even though the function pointer change and the
+ * ust_marker enabling are two distinct operations that modifies the
+ * execution flow of preemptible code.
-notrace void __mark_empty_function(const struct marker *mdata,
- void *probe_private, struct registers *regs, void *call_private, const char *fmt, va_list *args)
+notrace void __ust_marker_empty_function(const struct ust_marker *mdata,
+ void *probe_private, void *call_private, const char *fmt, va_list *args)
- * marker_probe_cb Callback that prepares the variable argument list for probes.
- * @mdata: pointer of type struct marker
+ * ust_marker_probe_cb Callback that prepares the variable argument list for probes.
+ * @mdata: pointer of type struct ust_marker
* need to put a full cmm_smp_rmb() in this branch. This is why we do not use
* rcu_dereference() for the pointer read.
*/
* 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,
- void *call_private, struct registers *regs, ...)
+notrace void ust_marker_probe_cb(const struct ust_marker *mdata,
+ void *call_private, ...)
/* Must read the ptype before ptr. They are not data dependant,
* so we put an explicit cmm_smp_rmb() here. */
cmm_smp_rmb();
/* Must read the ptype before ptr. They are not data dependant,
* so we put an explicit cmm_smp_rmb() here. */
cmm_smp_rmb();
/* Must read the ptr before private data. They are not data
* dependant, so we put an explicit cmm_smp_rmb() here. */
cmm_smp_rmb();
/* Must read the ptr before private data. They are not data
* 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,
+ va_start(args, call_private);
+ func(mdata, mdata->single.probe_private, call_private,
- * marker_probe_cb Callback that does not prepare the variable argument list.
- * @mdata: pointer of type struct marker
+ * ust_marker_probe_cb Callback that does not prepare the variable argument list.
+ * @mdata: pointer of type struct ust_marker
-static notrace void marker_probe_cb_noarg(const struct marker *mdata,
- void *call_private, struct registers *regs, ...)
+static notrace void ust_marker_probe_cb_noarg(const struct ust_marker *mdata,
+ void *call_private, ...)
/* Must read the ptype before ptr. They are not data dependant,
* so we put an explicit cmm_smp_rmb() here. */
cmm_smp_rmb();
/* Must read the ptype before ptr. They are not data dependant,
* so we put an explicit cmm_smp_rmb() here. */
cmm_smp_rmb();
/* Must read the ptr before private data. They are not data
* dependant, so we put an explicit cmm_smp_rmb() here. */
cmm_smp_rmb();
/* Must read the ptr before private data. They are not data
* dependant, so we put an explicit cmm_smp_rmb() here. */
cmm_smp_rmb();
- func(mdata, mdata->single.probe_private, regs, call_private,
+ func(mdata, mdata->single.probe_private, call_private,
call_private, mdata->format, &args);
}
//ust// rcu_read_unlock_sched_notrace();
call_private, mdata->format, &args);
}
//ust// rcu_read_unlock_sched_notrace();
- struct marker_entry *entry = _ust_container_of(head,
- struct marker_entry, rcu);
+ struct ust_marker_entry *entry = _ust_container_of(head,
+ struct ust_marker_entry, rcu);
-static struct marker_probe_closure *
-marker_entry_add_probe(struct marker_entry *entry,
- marker_probe_func *probe, void *probe_private)
+static struct ust_marker_probe_closure *
+ust_marker_entry_add_probe(struct ust_marker_entry *entry,
+ ust_marker_probe_func *probe, void *probe_private)
new[nr_probes].func = probe;
new[nr_probes].probe_private = probe_private;
entry->refcount = nr_probes + 1;
new[nr_probes].func = probe;
new[nr_probes].probe_private = probe_private;
entry->refcount = nr_probes + 1;
-static struct marker_probe_closure *
-marker_entry_remove_probe(struct marker_entry *entry,
- marker_probe_func *probe, void *probe_private)
+static struct ust_marker_probe_closure *
+ust_marker_entry_remove_probe(struct ust_marker_entry *entry,
+ ust_marker_probe_func *probe, void *probe_private)
/* 1 -> 0 probes */
WARN_ON(probe && entry->single.func != probe);
WARN_ON(entry->single.probe_private != probe_private);
/* 1 -> 0 probes */
WARN_ON(probe && entry->single.func != probe);
WARN_ON(entry->single.probe_private != probe_private);
- * Get marker if the marker is present in the marker hash table.
- * Must be called with markers_mutex held.
+ * Get ust_marker if the ust_marker is present in the ust_marker hash table.
+ * Must be called with ust_marker_mutex held.
size_t channel_len = strlen(channel) + 1;
size_t name_len = strlen(name) + 1;
u32 hash;
hash = jhash(channel, channel_len-1, 0) ^ jhash(name, name_len-1, 0);
size_t channel_len = strlen(channel) + 1;
size_t name_len = strlen(name) + 1;
u32 hash;
hash = jhash(channel, channel_len-1, 0) ^ jhash(name, name_len-1, 0);
cds_hlist_for_each_entry(e, node, head, hlist) {
if (!strcmp(channel, e->channel) && !strcmp(name, e->name))
return e;
cds_hlist_for_each_entry(e, node, head, hlist) {
if (!strcmp(channel, e->channel) && !strcmp(name, e->name))
return e;
hash = jhash(channel, channel_len-1, 0) ^ jhash(name, name_len-1, 0);
if (format)
format_len = strlen(format) + 1;
hash = jhash(channel, channel_len-1, 0) ^ jhash(name, name_len-1, 0);
if (format)
format_len = strlen(format) + 1;
cds_hlist_for_each_entry(e, node, head, hlist) {
if (!strcmp(channel, e->channel) && !strcmp(name, e->name)) {
cds_hlist_for_each_entry(e, node, head, hlist) {
if (!strcmp(channel, e->channel) && !strcmp(name, e->name)) {
* Using zmalloc here to allocate a variable length element. Could
* cause some memory fragmentation if overused.
*/
* Using zmalloc here to allocate a variable length element. Could
* cause some memory fragmentation if overused.
*/
if (format) {
e->format = &e->name[name_len];
memcpy(e->format, format, format_len);
if (format) {
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;
+ if (strcmp(e->format, UST_MARKER_NOARGS) == 0)
+ e->call = ust_marker_probe_cb_noarg;
- e->call = marker_probe_cb;
- trace_mark(metadata, core_marker_format,
+ e->call = ust_marker_probe_cb;
+ __ust_marker(metadata, core_marker_format, NULL,
"channel %s name %s format %s",
e->channel, e->name, e->format);
} else {
e->format = NULL;
"channel %s name %s format %s",
e->channel, e->name, e->format);
} else {
e->format = NULL;
int ret;
hash = jhash(channel, channel_len-1, 0) ^ jhash(name, name_len-1, 0);
int ret;
hash = jhash(channel, channel_len-1, 0) ^ jhash(name, name_len-1, 0);
cds_hlist_for_each_entry(e, node, head, hlist) {
if (!strcmp(channel, e->channel) && !strcmp(name, e->name)) {
found = 1;
cds_hlist_for_each_entry(e, node, head, hlist) {
if (!strcmp(channel, e->channel) && !strcmp(name, e->name)) {
found = 1;
"channel %s name %s format %s",
entry->channel, entry->name, entry->format);
return 0;
}
/*
"channel %s name %s format %s",
entry->channel, entry->name, entry->format);
return 0;
}
/*
* We only update the single probe private data when the ptr is
* set to a _non_ single probe! (0 -> 1 and N -> 1, N != 1)
*/
* We only update the single probe private data when the ptr is
* set to a _non_ single probe! (0 -> 1 and N -> 1, N != 1)
*/
&& elem->single.probe_private != entry->single.probe_private
&& !elem->ptype);
elem->single.probe_private = entry->single.probe_private;
&& elem->single.probe_private != entry->single.probe_private
&& !elem->ptype);
elem->single.probe_private = entry->single.probe_private;
* Note: only waiting an RCU period after setting elem->call to the empty
* function insures that the original callback is not used anymore. This insured
* by rcu_read_lock_sched around the call site.
*/
* Note: only waiting an RCU period after setting elem->call to the empty
* function insures that the original callback is not used anymore. This insured
* by rcu_read_lock_sched around the call site.
*/
- pthread_mutex_lock(&markers_mutex);
- entry = get_marker(channel, name);
- pthread_mutex_unlock(&markers_mutex);
+ pthread_mutex_lock(&ust_marker_mutex);
+ entry = get_ust_marker(channel, name);
+ pthread_mutex_unlock(&ust_marker_mutex);
-void marker_update_probe_range(struct marker * const *begin,
- struct marker * const *end)
+void ust_marker_update_probe_range(struct ust_marker * const *begin,
+ struct ust_marker * const *end)
- cds_list_for_each_entry(lib, &libs, list)
- marker_update_probe_range(lib->markers_start,
- lib->markers_start + lib->markers_count);
+ cds_list_for_each_entry(lib, &ust_marker_libs, list)
+ ust_marker_update_probe_range(lib->ust_marker_start,
+ lib->ust_marker_start + lib->ust_marker_count);
- * marker_probe_register - Connect a probe to a marker
- * @channel: marker channel
- * @name: marker name
+ * ust_marker_probe_register - Connect a probe to a ust_marker
+ * @channel: ust_marker channel
+ * @name: ust_marker name
* Returns 0 if ok, error value on error.
* The probe address must at least be aligned on the architecture pointer size.
*/
* Returns 0 if ok, error value on error.
* The probe address must at least be aligned on the architecture pointer size.
*/
-int marker_probe_register(const char *channel, const char *name,
- const char *format, marker_probe_func *probe,
+int ust_marker_probe_register(const char *channel, const char *name,
+ const char *format, ust_marker_probe_func *probe,
- pthread_mutex_lock(&markers_mutex);
- entry = get_marker(channel, name);
+ pthread_mutex_lock(&ust_marker_mutex);
+ entry = get_ust_marker(channel, name);
"channel %s name %s event_id %hu "
"int #1u%zu long #1u%zu pointer #1u%zu "
"size_t #1u%zu alignment #1u%u",
"channel %s name %s event_id %hu "
"int #1u%zu long #1u%zu pointer #1u%zu "
"size_t #1u%zu alignment #1u%u",
* make sure it's executed now.
*/
//ust// if (entry->rcu_pending)
//ust// rcu_cmm_barrier_sched();
* make sure it's executed now.
*/
//ust// if (entry->rcu_pending)
//ust// rcu_cmm_barrier_sched();
- pthread_mutex_lock(&markers_mutex);
- entry = get_marker(channel, name);
+ pthread_mutex_lock(&ust_marker_mutex);
+ entry = get_ust_marker(channel, name);
- * marker_probe_unregister - Disconnect a probe from a marker
- * @channel: marker channel
- * @name: marker name
+ * ust_marker_probe_unregister - Disconnect a probe from a ust_marker
+ * @channel: ust_marker channel
+ * @name: ust_marker name
* We do not need to call a synchronize_sched to make sure the probes have
* finished running before doing a module unload, because the module unload
* itself uses stop_machine(), which insures that every preempt disabled section
* have finished.
*/
* We do not need to call a synchronize_sched to make sure the probes have
* finished running before doing a module unload, because the module unload
* itself uses stop_machine(), which insures that every preempt disabled section
* have finished.
*/
-int marker_probe_unregister(const char *channel, const char *name,
- marker_probe_func *probe, void *probe_private)
+int ust_marker_probe_unregister(const char *channel, const char *name,
+ ust_marker_probe_func *probe, void *probe_private)
- pthread_mutex_lock(&markers_mutex);
- entry = get_marker(channel, name);
+ pthread_mutex_lock(&ust_marker_mutex);
+ entry = get_ust_marker(channel, name);
- old = marker_entry_remove_probe(entry, probe, probe_private);
- pthread_mutex_unlock(&markers_mutex);
+ old = ust_marker_entry_remove_probe(entry, probe, probe_private);
+ pthread_mutex_unlock(&ust_marker_mutex);
- pthread_mutex_lock(&markers_mutex);
- entry = get_marker(channel, name);
+ pthread_mutex_lock(&ust_marker_mutex);
+ entry = get_ust_marker(channel, name);
cmm_smp_wmb();
//ust// call_rcu_sched(&entry->rcu, free_old_closure);
synchronize_rcu(); free_old_closure(&entry->rcu);
cmm_smp_wmb();
//ust// call_rcu_sched(&entry->rcu, free_old_closure);
synchronize_rcu(); free_old_closure(&entry->rcu);
-static struct marker_entry *
-get_marker_from_private_data(marker_probe_func *probe, void *probe_private)
+static struct ust_marker_entry *
+get_ust_marker_from_private_data(ust_marker_probe_func *probe, void *probe_private)
cds_hlist_for_each_entry(entry, node, head, hlist) {
if (!entry->ptype) {
if (entry->single.func == probe
cds_hlist_for_each_entry(entry, node, head, hlist) {
if (!entry->ptype) {
if (entry->single.func == probe
* Return 0 on success or error value.
* We do not need to call a synchronize_sched to make sure the probes have
* finished running before doing a module unload, because the module unload
* itself uses stop_machine(), which insures that every preempt disabled section
* have finished.
*/
* Return 0 on success or error value.
* We do not need to call a synchronize_sched to make sure the probes have
* finished running before doing a module unload, because the module unload
* itself uses stop_machine(), which insures that every preempt disabled section
* have finished.
*/
- pthread_mutex_lock(&markers_mutex);
- entry = get_marker_from_private_data(probe, probe_private);
+ pthread_mutex_lock(&ust_marker_mutex);
+ entry = get_ust_marker_from_private_data(probe, probe_private);
- pthread_mutex_lock(&markers_mutex);
- entry = get_marker(channel, name);
+ pthread_mutex_lock(&ust_marker_mutex);
+ entry = get_ust_marker(channel, name);
//ust// call_rcu_sched(&entry->rcu, free_old_closure);
synchronize_rcu(); free_old_closure(&entry->rcu);
/* Ignore busy error message */
//ust// call_rcu_sched(&entry->rcu, free_old_closure);
synchronize_rcu(); free_old_closure(&entry->rcu);
/* Ignore busy error message */
- * marker_get_private_data - Get a marker's probe private data
- * @channel: marker channel
- * @name: marker name
+ * ust_marker_get_private_data - Get a ust_marker's probe private data
+ * @channel: ust_marker channel
+ * @name: ust_marker name
* owner of the data, or its content could vanish. This is mostly used to
* confirm that a caller is the owner of a registered probe.
*/
* owner of the data, or its content could vanish. This is mostly used to
* confirm that a caller is the owner of a registered probe.
*/
-void *marker_get_private_data(const char *channel, const char *name,
- marker_probe_func *probe, int num)
+void *ust_marker_get_private_data(const char *channel, const char *name,
+ ust_marker_probe_func *probe, int num)
size_t channel_len = strlen(channel) + 1;
size_t name_len = strlen(name) + 1;
int i;
u32 hash;
hash = jhash(channel, channel_len-1, 0) ^ jhash(name, name_len-1, 0);
size_t channel_len = strlen(channel) + 1;
size_t name_len = strlen(name) + 1;
int i;
u32 hash;
hash = jhash(channel, channel_len-1, 0) ^ jhash(name, name_len-1, 0);
cds_hlist_for_each_entry(e, node, head, hlist) {
if (!strcmp(channel, e->channel) && !strcmp(name, e->name)) {
if (!e->ptype) {
if (num == 0 && e->single.func == probe)
return e->single.probe_private;
} else {
cds_hlist_for_each_entry(e, node, head, hlist) {
if (!strcmp(channel, e->channel) && !strcmp(name, e->name)) {
if (!e->ptype) {
if (num == 0 && e->single.func == probe)
return e->single.probe_private;
} else {
//ust// hlist_for_each_entry(entry, node, head, hlist) {
//ust// ret = ltt_channels_get_index_from_name(entry->channel);
//ust// WARN_ON(ret < 0);
//ust// hlist_for_each_entry(entry, node, head, hlist) {
//ust// ret = ltt_channels_get_index_from_name(entry->channel);
//ust// WARN_ON(ret < 0);
- iter->marker = NULL;
- found = marker_get_iter_range(&iter->marker,
- iter_lib->markers_start,
- iter_lib->markers_start + iter_lib->markers_count);
+ iter->ust_marker = NULL;
+ found = ust_marker_get_iter_range(&iter->ust_marker,
+ iter_lib->ust_marker_start,
+ iter_lib->ust_marker_start + iter_lib->ust_marker_count);
- * marker_get_iter_range - Get a next marker iterator given a range.
- * @marker: current markers (in), next marker (out)
+ * ust_marker_get_iter_range - Get a next ust_marker iterator given a range.
+ * @ust_marker: current ust_marker (in), next ust_marker (out)
- * Returns whether a next marker has been found (1) or not (0).
- * Will return the first marker in the range if the input marker is NULL.
+ * Returns whether a next ust_marker has been found (1) or not (0).
+ * Will return the first ust_marker in the range if the input ust_marker is NULL.
-int marker_get_iter_range(struct marker * const **marker,
- struct marker * const *begin,
- struct marker * const *end)
+int ust_marker_get_iter_range(struct ust_marker * const **ust_marker,
+ struct ust_marker * const *begin,
+ struct ust_marker * const *end)
- if (!*marker && begin != end)
- *marker = begin;
- while (*marker >= begin && *marker < end) {
- if (!**marker)
- (*marker)++; /* skip dummy */
+ if (!*ust_marker && begin != end)
+ *ust_marker = begin;
+ while (*ust_marker >= begin && *ust_marker < end) {
+ if (!**ust_marker)
+ (*ust_marker)++; /* skip dummy */
- * iter->marker may be invalid because we blindly incremented it.
- * Make sure it is valid by marshalling on the markers, getting the
- * markers from following modules if necessary.
+ * iter->ust_marker may be invalid because we blindly incremented it.
+ * Make sure it is valid by marshalling on the ust_marker, getting the
+ * ust_marker from following modules if necessary.
struct cds_hlist_node *pos, *n;
cds_hlist_for_each_entry_safe(umark, pos, n, head, hlist) {
struct cds_hlist_node *pos, *n;
cds_hlist_for_each_entry_safe(umark, pos, n, head, hlist) {
/*
* Update current process.
* Note that we have to wait a whole scheduler period before we are sure that
/*
* Update current process.
* Note that we have to wait a whole scheduler period before we are sure that
-//ust// pthread_mutex_lock(&markers_mutex);
-//ust// pthread_mutex_lock(¤t->group_leader->user_markers_mutex);
+//ust// pthread_mutex_lock(&ust_marker_mutex);
+//ust// pthread_mutex_lock(¤t->group_leader->user_ust_marker_mutex);
//ust// if (strcmp(current->comm, "testprog") == 0)
//ust// DBG("do update pending for testprog");
//ust// hlist_for_each_entry(umark, pos,
//ust// if (strcmp(current->comm, "testprog") == 0)
//ust// DBG("do update pending for testprog");
//ust// hlist_for_each_entry(umark, pos,
-//ust// ¤t->group_leader->user_markers, hlist) {
-//ust// DBG("Updating marker %s in %s", umark->name, current->comm);
-//ust// entry = get_marker("userspace", umark->name);
+//ust// ¤t->group_leader->user_ust_marker, hlist) {
+//ust// DBG("Updating ust_marker %s in %s", umark->name, current->comm);
+//ust// entry = get_ust_marker("userspace", umark->name);
//ust// if (entry) {
//ust// if (entry->format &&
//ust// strcmp(entry->format, umark->format) != 0) {
//ust// if (entry) {
//ust// if (entry->format &&
//ust// strcmp(entry->format, umark->format) != 0) {
-//ust// clear_thread_flag(TIF_MARKER_PENDING);
-//ust// pthread_mutex_unlock(¤t->group_leader->user_markers_mutex);
-//ust// pthread_mutex_unlock(&markers_mutex);
+//ust// clear_thread_flag(TIF_UST_MARKER_PENDING);
+//ust// pthread_mutex_unlock(¤t->group_leader->user_ust_marker_mutex);
+//ust// pthread_mutex_unlock(&ust_marker_mutex);
* We assume that when the leader exits, no more references can be done to the
* leader structure by the other threads.
*/
* We assume that when the leader exits, no more references can be done to the
* leader structure by the other threads.
*/
struct cds_hlist_node *pos, *n;
if (thread_group_leader(p)) {
struct cds_hlist_node *pos, *n;
if (thread_group_leader(p)) {
- pthread_mutex_lock(&markers_mutex);
- pthread_mutex_lock(&p->user_markers_mutex);
- cds_hlist_for_each_entry_safe(umark, pos, n, &p->user_markers,
+ pthread_mutex_lock(&ust_marker_mutex);
+ pthread_mutex_lock(&p->user_ust_marker_mutex);
+ cds_hlist_for_each_entry_safe(umark, pos, n, &p->user_ust_marker,
- INIT_HLIST_HEAD(&p->user_markers);
- p->user_markers_sequence++;
- pthread_mutex_unlock(&p->user_markers_mutex);
- pthread_mutex_unlock(&markers_mutex);
+ INIT_HLIST_HEAD(&p->user_ust_marker);
+ p->user_ust_marker_sequence++;
+ pthread_mutex_unlock(&p->user_ust_marker_mutex);
+ pthread_mutex_unlock(&ust_marker_mutex);
- pthread_mutex_lock(&markers_mutex);
- entry = get_marker(channel, name);
- pthread_mutex_unlock(&markers_mutex);
+ pthread_mutex_lock(&ust_marker_mutex);
+ entry = get_ust_marker(channel, name);
+ pthread_mutex_unlock(&ust_marker_mutex);
unsigned long val, void *data)
{
struct module *mod = data;
switch (val) {
case MODULE_STATE_COMING:
unsigned long val, void *data)
{
struct module *mod = data;
switch (val) {
case MODULE_STATE_COMING:
- marker_update_probe_range(mod->markers,
- mod->markers + mod->num_markers);
+ ust_marker_update_probe_range(mod->ust_marker,
+ mod->ust_marker + mod->num_ust_marker);
- marker_update_probe_range(mod->markers,
- mod->markers + mod->num_markers);
+ ust_marker_update_probe_range(mod->ust_marker,
+ mod->ust_marker + mod->num_ust_marker);
-struct notifier_block marker_module_nb = {
- .notifier_call = marker_module_notify,
+struct notifier_block ust_marker_module_nb = {
+ .notifier_call = ust_marker_module_notify,
-//ust// __initcall(init_markers);
-/* TODO: call marker_module_nb() when a library is linked at runtime (dlopen)? */
+//ust// __initcall(init_ust_marker);
+/* TODO: call ust_marker_module_nb() when a library is linked at runtime (dlopen)? */
struct ltt_probe_private_data call_data;
struct cds_hlist_head *head;
struct cds_hlist_node *node;
unsigned int i;
struct ltt_probe_private_data call_data;
struct cds_hlist_head *head;
struct cds_hlist_node *node;
unsigned int i;
cds_hlist_for_each_entry(entry, node, head, hlist) {
cds_hlist_for_each_entry(entry, node, head, hlist) {
BUG_ON(iter == pl); /* Should never be in the list twice */
if (iter < pl) {
/* We belong to the location right after iter. */
BUG_ON(iter == pl); /* Should never be in the list twice */
if (iter < pl) {
/* We belong to the location right after iter. */
- DBG("just registered a markers section from %p and having %d markers (minus dummy markers)", markers_start, markers_count);
+ DBG("just registered a ust_marker section from %p and having %d ust_marker (minus dummy ust_marker)", ust_marker_start, ust_marker_count);
- cds_list_for_each_entry(lib, &libs, list) {
- if(lib->markers_start == markers_start) {
- struct lib *lib2free = lib;
+ cds_list_for_each_entry(lib, &ust_marker_libs, list) {
+ if(lib->ust_marker_start == ust_marker_start) {
+ struct ust_marker_lib *lib2free = lib;
- marker_register_lib(__start___markers_ptrs,
- __stop___markers_ptrs
- - __start___markers_ptrs);
+ ust_marker_register_lib(__start___ust_marker_ptrs,
+ __stop___ust_marker_ptrs
+ - __start___ust_marker_ptrs);