[ltt-dev] [UST PATCH] Remove //ust commented code

David Goulet david.goulet at polymtl.ca
Tue Nov 2 12:13:39 EDT 2010


Hi Nils,

I remember talking about that with Pierre-Marc and he raised an 
interesting concern about that. He suggested that we should *strongly* 
review the code around these comments to double check for correct 
implementation and possible errors. I will agree that this is quite a 
pain to do but I do agree with that.

Don't you have any intern over there @Ericsson :P ?

David

On 10-11-01 06:09 AM, Nils Carlson wrote:
> I don't like keeping it around, makes grepping a pain. I've made
> a new TODO and added a FIXME or two, but there's a lot more
> potential/work here.
>
> Signed-off-by: Nils Carlson<nils.carlson at ericsson.com>
> ---
>   TODO                     |    1 +
>   libust/buffers.c         |  125 ++-----------------------
>   libust/buffers.h         |   23 +----
>   libust/channels.c        |   12 ---
>   libust/marker-control.c  |  196 +---------------------------------------
>   libust/marker.c          |  154 ++++---------------------------
>   libust/serialize.c       |   11 +--
>   libust/tracepoint.c      |   73 +--------------
>   libust/tracer.c          |  230 +++-------------------------------------------
>   libust/tracer.h          |    2 +-
>   libust/tracercore.c      |    2 -
>   libust/type-serializer.c |    2 -
>   12 files changed, 50 insertions(+), 781 deletions(-)
>
> diff --git a/TODO b/TODO
> index 46d5b64..ef8f3d0 100644
> --- a/TODO
> +++ b/TODO
> @@ -25,3 +25,4 @@
>     This is to guarantee there will never be a system call in the tracing path. Currently there is a system
>     call when the buffer is full to notify the listener it can be collected.
>   - In early tracing mode, the only channels that can be used reliably are "metadata" and "ust". The "usttrace" tool always uses early tracing and is hence subject to this limitation. Traces setup with the "ustctl" tool ("manual mode") are not subject to this limitation and can contain channels that have any name. Also, when loading a library with dlopen(), in order for markers in the library to generate events in the trace, these markers must be in the same channel as an event that was in the executable or its dynamically linked libraries that were loaded at start time. If using early tracing, only the "ust" channel can be used. Fix this. (RCU locking of channel structures in progress by Mathieu Desnoyers)
> +- There was event_id compacting stuff earlier, maybe reintroduce?
> diff --git a/libust/buffers.c b/libust/buffers.c
> index bb5d8c5..2f6b760 100644
> --- a/libust/buffers.c
> +++ b/libust/buffers.c
> @@ -217,7 +217,6 @@ static void ust_buffers_destroy_buf(struct ust_buffer *buf)
>   		PERROR("munmap");
>   	}
>
> -//ust//	chan->buf[buf->cpu] = NULL;
>   	free(buf);
>   	kref_put(&chan->kref, ust_buffers_destroy_channel);
>   }
> @@ -316,8 +315,7 @@ void ust_buffers_channel_close(struct ust_channel *chan)
>   	for(i=0; i<chan->n_cpus; i++) {
>   	/* FIXME: if we make it here, then all buffers were necessarily allocated. Moreover, we don't
>   	 * initialize to NULL so we cannot use this check. Should we? */
> -//ust//		if (chan->buf[i])
> -			ust_buffers_close_buf(chan->buf[i]);
> +		ust_buffers_close_buf(chan->buf[i]);
>   	}
>
>   	list_del(&chan->list);
> @@ -385,22 +383,10 @@ static notrace void ltt_buf_unfull(struct ust_buffer *buf,
>   {
>   }
>
> -/*
> - * Promote compiler barrier to a smp_mb().
> - * For the specific LTTng case, this IPI call should be removed if the
> - * architecture does not reorder writes.  This should eventually be provided by
> - * a separate architecture-specific infrastructure.
> - */
> -//ust// static void remote_mb(void *info)
> -//ust// {
> -//ust// 	smp_mb();
> -//ust// }
> -
>   int ust_buffers_get_subbuf(struct ust_buffer *buf, long *consumed)
>   {
>   	struct ust_channel *channel = buf->chan;
>   	long consumed_old, consumed_idx, commit_count, write_offset;
> -//ust//	int retval;
>
>   	consumed_old = uatomic_read(&buf->consumed);
>   	consumed_idx = SUBBUF_INDEX(consumed_old, buf->chan);
> @@ -442,19 +428,12 @@ int ust_buffers_get_subbuf(struct ust_buffer *buf, long *consumed)
>   	 * really have to ensure total order between the 3 barriers running on
>   	 * the 2 CPUs.
>   	 */
> -//ust// #ifdef LTT_NO_IPI_BARRIER
> +
>   	/*
>   	 * Local rmb to match the remote wmb to read the commit count before the
>   	 * buffer data and the write offset.
>   	 */
>   	smp_rmb();
> -//ust// #else
> -//ust// 	if (raw_smp_processor_id() != buf->cpu) {
> -//ust// 		smp_mb();	/* Total order with IPI handler smp_mb() */
> -//ust// 		smp_call_function_single(buf->cpu, remote_mb, NULL, 1);
> -//ust// 		smp_mb();	/* Total order with IPI handler smp_mb() */
> -//ust// 	}
> -//ust// #endif
>
>   	write_offset = uatomic_read(&buf->offset);
>   	/*
> @@ -478,11 +457,6 @@ int ust_buffers_get_subbuf(struct ust_buffer *buf, long *consumed)
>   		return -EAGAIN;
>   	}
>
> -	/* FIXME: is this ok to disable the reading feature? */
> -//ust//	retval = update_read_sb_index(buf, consumed_idx);
> -//ust//	if (retval)
> -//ust//		return retval;
> -
>   	*consumed = consumed_old;
>
>   	return 0;
> @@ -497,14 +471,12 @@ int ust_buffers_put_subbuf(struct ust_buffer *buf, unsigned long uconsumed_old)
>   	consumed_old = consumed_old | uconsumed_old;
>   	consumed_new = SUBBUF_ALIGN(consumed_old, buf->chan);
>
> -//ust//	spin_lock(&ltt_buf->full_lock);
>   	if (uatomic_cmpxchg(&buf->consumed, consumed_old,
>   				consumed_new)
>   	    != consumed_old) {
>   		/* We have been pushed by the writer : the last
>   		 * buffer read _is_ corrupted! It can also
>   		 * happen if this is a buffer we never got. */
> -//ust//		spin_unlock(&ltt_buf->full_lock);
>   		return -EIO;
>   	} else {
>   		/* tell the client that buffer is now unfull */
> @@ -513,7 +485,6 @@ int ust_buffers_put_subbuf(struct ust_buffer *buf, unsigned long uconsumed_old)
>   		index = SUBBUF_INDEX(consumed_old, buf->chan);
>   		data = BUFFER_OFFSET(consumed_old, buf->chan);
>   		ltt_buf_unfull(buf, index, data);
> -//ust//		spin_unlock(&ltt_buf->full_lock);
>   	}
>   	return 0;
>   }
> @@ -562,9 +533,6 @@ static void ltt_relay_print_errors(struct ust_trace *trace,
>   	if (!channel)
>   	        return;
>
> -//ust//	for (cons_off = 0; cons_off<  rchan->alloc_size;
> -//ust//	     cons_off = SUBBUF_ALIGN(cons_off, rchan))
> -//ust//		ust_buffers_print_written(ltt_chan, cons_off, cpu);
>   	for (cons_off = uatomic_read(&ltt_buf->consumed);
>   			(SUBBUF_TRUNC(uatomic_read(&ltt_buf->offset),
>   				      channel)
> @@ -597,45 +565,6 @@ static void ltt_relay_release_channel(struct kref *kref)
>   	free(ltt_chan->buf);
>   }
>
> -/*
> - * Create ltt buffer.
> - */
> -//ust// static int ltt_relay_create_buffer(struct ust_trace *trace,
> -//ust// 		struct ltt_channel_struct *ltt_chan, struct rchan_buf *buf,
> -//ust// 		unsigned int cpu, unsigned int n_subbufs)
> -//ust// {
> -//ust// 	struct ltt_channel_buf_struct *ltt_buf =
> -//ust// 		percpu_ptr(ltt_chan->buf, cpu);
> -//ust// 	unsigned int j;
> -//ust//
> -//ust// 	ltt_buf->commit_count =
> -//ust// 		kzalloc_node(sizeof(ltt_buf->commit_count) * n_subbufs,
> -//ust// 			GFP_KERNEL, cpu_to_node(cpu));
> -//ust// 	if (!ltt_buf->commit_count)
> -//ust// 		return -ENOMEM;
> -//ust// 	kref_get(&trace->kref);
> -//ust// 	kref_get(&trace->ltt_transport_kref);
> -//ust// 	kref_get(&ltt_chan->kref);
> -//ust// 	uatomic_set(&ltt_buf->offset, ltt_subbuffer_header_size());
> -//ust// 	uatomic_set(&ltt_buf->consumed, 0);
> -//ust// 	uatomic_set(&ltt_buf->active_readers, 0);
> -//ust// 	for (j = 0; j<  n_subbufs; j++)
> -//ust// 		uatomic_set(&ltt_buf->commit_count[j], 0);
> -//ust// 	init_waitqueue_head(&ltt_buf->write_wait);
> -//ust// 	uatomic_set(&ltt_buf->wakeup_readers, 0);
> -//ust// 	spin_lock_init(&ltt_buf->full_lock);
> -//ust//
> -//ust// 	ltt_buffer_begin_callback(buf, trace->start_tsc, 0);
> -//ust// 	/* atomic_add made on local variable on data that belongs to
> -//ust// 	 * various CPUs : ok because tracing not started (for this cpu). */
> -//ust// 	uatomic_add(&ltt_buf->commit_count[0], ltt_subbuffer_header_size());
> -//ust//
> -//ust// 	uatomic_set(&ltt_buf->events_lost, 0);
> -//ust// 	uatomic_set(&ltt_buf->corrupted_subbuffers, 0);
> -//ust//
> -//ust// 	return 0;
> -//ust// }
> -
>   static int ust_buffers_init_buffer(struct ust_trace *trace,
>   		struct ust_channel *ltt_chan, struct ust_buffer *buf,
>   		unsigned int n_subbufs)
> @@ -658,9 +587,6 @@ static int ust_buffers_init_buffer(struct ust_trace *trace,
>   		uatomic_set(&buf->commit_count[j].cc, 0);
>   		uatomic_set(&buf->commit_count[j].cc_sb, 0);
>   	}
> -//ust//	init_waitqueue_head(&buf->write_wait);
> -//ust//	uatomic_set(&buf->wakeup_readers, 0);
> -//ust//	spin_lock_init(&buf->full_lock);
>
>   	ltt_buffer_begin(buf, trace->start_tsc, 0);
>
> @@ -677,10 +603,6 @@ static int ust_buffers_init_buffer(struct ust_trace *trace,
>   	buf->data_ready_fd_read = fds[0];
>   	buf->data_ready_fd_write = fds[1];
>
> -//ust//	buf->commit_seq = malloc(sizeof(buf->commit_seq) * n_subbufs);
> -//ust//	if(!ltt_buf->commit_seq) {
> -//ust//		return -1;
> -//ust//	}
>   	memset(buf->commit_seq, 0, sizeof(buf->commit_seq[0]) * n_subbufs);
>
>   	/* FIXME: decrementally destroy on error */
> @@ -697,12 +619,12 @@ static void ust_buffers_destroy_buffer(struct ust_channel *ltt_chan, int cpu)
>   	kref_put(&ltt_chan->trace->ltt_transport_kref,
>   		ltt_release_transport);
>   	ltt_relay_print_buffer_errors(ltt_chan, cpu);
> -//ust//	free(ltt_buf->commit_seq);
> +
>   	free(ltt_buf->commit_count);
>   	ltt_buf->commit_count = NULL;
>   	kref_put(&ltt_chan->kref, ltt_relay_release_channel);
>   	kref_put(&trace->kref, ltt_release_trace);
> -//ust//	wake_up_interruptible(&trace->kref_wq);
> +
>   }
>
>   static int ust_buffers_alloc_channel_buf_structs(struct ust_channel *chan)
> @@ -776,7 +698,7 @@ static int ust_buffers_create_channel(const char *trace_name, struct ust_trace *
>   	ltt_chan->n_subbufs_order = get_count_order(n_subbufs);
>   	ltt_chan->commit_count_mask = (~0UL>>  ltt_chan->n_subbufs_order);
>   	ltt_chan->n_cpus = get_n_cpus();
> -//ust//	ltt_chan->buf = percpu_alloc_mask(sizeof(struct ltt_channel_buf_struct), GFP_KERNEL, cpu_possible_map);
> +
>   	ltt_chan->buf = (void *) zmalloc(ltt_chan->n_cpus * sizeof(void *));
>   	if(ltt_chan->buf == NULL) {
>   		goto error;
> @@ -811,37 +733,13 @@ error:
>   	return -1;
>   }
>
> -static void ltt_relay_async_wakeup_chan(struct ust_channel *ltt_channel)
> -{
> -//ust//	unsigned int i;
> -//ust//	struct rchan *rchan = ltt_channel->trans_channel_data;
> -//ust//
> -//ust//	for_each_possible_cpu(i) {
> -//ust//		struct ltt_channel_buf_struct *ltt_buf =
> -//ust//			percpu_ptr(ltt_channel->buf, i);
> -//ust//
> -//ust//		if (uatomic_read(&ltt_buf->wakeup_readers) == 1) {
> -//ust//			uatomic_set(&ltt_buf->wakeup_readers, 0);
> -//ust//			wake_up_interruptible(&rchan->buf[i]->read_wait);
> -//ust//		}
> -//ust//	}
> -}
>
>   static void ltt_relay_finish_buffer(struct ust_channel *channel, unsigned int cpu)
>   {
> -//	int result;
> -
>   	if (channel->buf[cpu]) {
>   		struct ust_buffer *buf = channel->buf[cpu];
>   		ltt_force_switch(buf, FORCE_FLUSH);
> -//ust//		ltt_relay_wake_writers(ltt_buf);
> -		/* closing the pipe tells the consumer the buffer is finished */
> -		
> -		//result = write(ltt_buf->data_ready_fd_write, "D", 1);
> -		//if(result == -1) {
> -		//	PERROR("write (in ltt_relay_finish_buffer)");
> -		//	ERR("this should never happen!");
> -		//}
> +
>   		close(buf->data_ready_fd_write);
>   	}
>   }
> @@ -1082,14 +980,12 @@ void ltt_force_switch_lockless_slow(struct ust_buffer *buf,
>   	 */
>   	if (mode == FORCE_ACTIVE) {
>   		ltt_reserve_push_reader(chan, buf, offsets.end - 1);
> -//ust//		ltt_clear_noref_flag(chan, buf, SUBBUF_INDEX(offsets.end - 1, chan));
>   	}
>
>   	/*
>   	 * Switch old subbuffer if needed.
>   	 */
>   	if (offsets.end_switch_old) {
> -//ust//		ltt_clear_noref_flag(rchan, buf, SUBBUF_INDEX(offsets.old - 1, rchan));
>   		ltt_reserve_switch_old_subbuf(chan, buf,&offsets,&tsc);
>   	}
>
> @@ -1268,15 +1164,9 @@ int ltt_reserve_slot_lockless_slow(struct ust_channel *chan,
>   	ltt_reserve_push_reader(chan, buf, offsets.end - 1);
>
>   	/*
> -	 * Clear noref flag for this subbuffer.
> -	 */
> -//ust//	ltt_clear_noref_flag(chan, buf, SUBBUF_INDEX(offsets.end - 1, chan));
> -
> -	/*
>   	 * Switch old subbuffer if needed.
>   	 */
>   	if (unlikely(offsets.end_switch_old)) {
> -//ust//		ltt_clear_noref_flag(chan, buf, SUBBUF_INDEX(offsets.old - 1, chan));
>   		ltt_reserve_switch_old_subbuf(chan, buf,&offsets, tsc);
>   		DBG("Switching %s_%d", chan->channel_name, cpu);
>   	}
> @@ -1301,7 +1191,8 @@ static struct ltt_transport ust_relay_transport = {
>   		.create_channel = ust_buffers_create_channel,
>   		.finish_channel = ltt_relay_finish_channel,
>   		.remove_channel = ltt_relay_remove_channel,
> -		.wakeup_channel = ltt_relay_async_wakeup_chan,
> +		/* FIXME: No such function, is it needed? */
> +		.wakeup_channel = NULL,
>   	},
>   };
>
> diff --git a/libust/buffers.h b/libust/buffers.h
> index a2ad83e..562f096 100644
> --- a/libust/buffers.h
> +++ b/libust/buffers.h
> @@ -89,7 +89,7 @@ struct ust_buffer {
>   	struct list_head open_buffers_list;
>
>   	unsigned int finalized;
> -//ust//	struct timer_list switch_timer; /* timer for periodical switch */
> +
>   	unsigned long switch_timer_interval; /* 0 = unset */
>
>   	struct ust_channel *chan;
> @@ -255,7 +255,7 @@ static __inline__ void ltt_check_deliver(struct ust_channel *chan,
>   			/*
>   			 * Set noref flag for this subbuffer.
>   			 */
> -//ust//			ltt_set_noref_flag(rchan, buf, idx);
> +
>   			ltt_vmcore_check_deliver(buf, commit_count, idx);
>
>   			/* wakeup consumer */
> @@ -324,12 +324,6 @@ static __inline__ int ltt_relay_try_reserve(
>
>   	*tsc = trace_clock_read64();
>
> -//ust// #ifdef CONFIG_LTT_VMCORE
> -//ust// 	prefetch(&buf->commit_count[SUBBUF_INDEX(*o_begin, rchan)]);
> -//ust// 	prefetch(&buf->commit_seq[SUBBUF_INDEX(*o_begin, rchan)]);
> -//ust// #else
> -//ust// 	prefetchw(&buf->commit_count[SUBBUF_INDEX(*o_begin, rchan)]);
> -//ust// #endif
>   	if (last_tsc_overflow(buf, *tsc))
>   		*rflags = LTT_RFLAG_ID_SIZE_TSC;
>
> @@ -403,11 +397,6 @@ static __inline__ int ltt_reserve_slot(struct ust_channel *chan,
>   	 */
>   	ltt_reserve_push_reader(chan, buf, o_end - 1);
>
> -	/*
> -	 * Clear noref flag for this subbuffer.
> -	 */
> -//ust//	ltt_clear_noref_flag(chan, buf, SUBBUF_INDEX(o_end - 1, chan));
> -
>   	*buf_offset = o_begin + before_hdr_pad;
>   	return 0;
>   slow_path:
> @@ -434,7 +423,7 @@ static __inline__ void ltt_force_switch(struct ust_buffer *buf,
>    * commit count reaches back the reserve offset (module subbuffer size). It is
>    * useful for crash dump.
>    */
> -//ust// #ifdef CONFIG_LTT_VMCORE
> +
>   static __inline__ void ltt_write_commit_counter(struct ust_channel *chan,
>   		struct ust_buffer *buf, long idx, long buf_offset,
>   		long commit_count, size_t data_size)
> @@ -460,12 +449,6 @@ static __inline__ void ltt_write_commit_counter(struct ust_channel *chan,
>
>   	DBG("commit_seq for channel %s_%d, subbuf %ld is now %ld", buf->chan->channel_name, buf->cpu, idx, commit_count);
>   }
> -//ust// #else
> -//ust// static __inline__ void ltt_write_commit_counter(struct ust_buffer *buf,
> -//ust// 		long idx, long buf_offset, long commit_count, size_t data_size)
> -//ust// {
> -//ust// }
> -//ust// #endif
>
>   /*
>    * Atomic unordered slot commit. Increments the commit count in the
> diff --git a/libust/channels.c b/libust/channels.c
> index 57e9801..b454ecc 100644
> --- a/libust/channels.c
> +++ b/libust/channels.c
> @@ -80,8 +80,6 @@ static void release_channel_setting(struct kref *kref)
>   			iter->index = free_index++;
>   			iter->free_event_id = 0;
>   		}
> -		/* FIXME: why not run this? */
> -//ust//		markers_compact_event_ids();
>   	}
>   }
>
> @@ -133,7 +131,6 @@ end:
>   	pthread_mutex_unlock(&ltt_channel_mutex);
>   	return ret;
>   }
> -//ust// EXPORT_SYMBOL_GPL(ltt_channels_register);
>
>   /**
>    * ltt_channels_unregister - Unregister a trace channel.
> @@ -157,7 +154,6 @@ end:
>   	pthread_mutex_unlock(&ltt_channel_mutex);
>   	return ret;
>   }
> -//ust// EXPORT_SYMBOL_GPL(ltt_channels_unregister);
>
>   /**
>    * ltt_channels_set_default - Set channel default behavior.
> @@ -184,7 +180,6 @@ end:
>   	pthread_mutex_unlock(&ltt_channel_mutex);
>   	return ret;
>   }
> -//ust// EXPORT_SYMBOL_GPL(ltt_channels_set_default);
>
>   /**
>    * ltt_channels_get_name_from_index - get channel name from channel index
> @@ -202,7 +197,6 @@ const char *ltt_channels_get_name_from_index(unsigned int index)
>   			return iter->name;
>   	return NULL;
>   }
> -//ust// EXPORT_SYMBOL_GPL(ltt_channels_get_name_from_index);
>
>   static struct ltt_channel_setting *
>   ltt_channels_get_setting_from_name(const char *name)
> @@ -234,7 +228,6 @@ int ltt_channels_get_index_from_name(const char *name)
>   	else
>   		return -1;
>   }
> -//ust// EXPORT_SYMBOL_GPL(ltt_channels_get_index_from_name);
>
>   /**
>    * ltt_channels_trace_alloc - Allocate channel structures for a trace
> @@ -283,7 +276,6 @@ end:
>   	pthread_mutex_unlock(&ltt_channel_mutex);
>   	return channel;
>   }
> -//ust// EXPORT_SYMBOL_GPL(ltt_channels_trace_alloc);
>
>   /**
>    * ltt_channels_trace_free - Free one trace's channels
> @@ -301,7 +293,6 @@ void ltt_channels_trace_free(struct ust_channel *channels)
>   	pthread_mutex_unlock(&ltt_channel_mutex);
>   	unlock_markers();
>   }
> -//ust// EXPORT_SYMBOL_GPL(ltt_channels_trace_free);
>
>   /**
>    * _ltt_channels_get_event_id - get next event ID for a marker
> @@ -358,6 +349,3 @@ int ltt_channels_get_event_id(const char *channel, const char *name)
>   	return ret;
>   }
>
> -//ust// MODULE_LICENSE("GPL");
> -//ust// MODULE_AUTHOR("Mathieu Desnoyers");
> -//ust// MODULE_DESCRIPTION("Linux Trace Toolkit Next Generation Channel Management");
> diff --git a/libust/marker-control.c b/libust/marker-control.c
> index db7311a..0ffa2f0 100644
> --- a/libust/marker-control.c
> +++ b/libust/marker-control.c
> @@ -46,17 +46,12 @@ struct ltt_available_probe default_probe = {
>   	.callbacks[0] = ltt_serialize_data,
>   };
>
> -//ust//static struct kmem_cache *markers_loaded_cachep;
>   static LIST_HEAD(markers_loaded_list);
>   /*
>    * List sorted by name strcmp order.
>    */
>   static LIST_HEAD(probes_registered_list);
>
> -//ust// static struct proc_dir_entry *pentry;
> -
> -//ust// static struct file_operations ltt_fops;
> -
>   static struct ltt_available_probe *get_probe_from_name(const char *pname)
>   {
>   	struct ltt_available_probe *iter;
> @@ -77,30 +72,6 @@ static struct ltt_available_probe *get_probe_from_name(const char *pname)
>   		return NULL;
>   }
>
> -/* (unused)
> -static char *skip_spaces(char *buf)
> -{
> -	while (*buf != '\0'&&  isspace(*buf))
> -		buf++;
> -	return buf;
> -}
> -
> -static char *skip_nonspaces(char *buf)
> -{
> -	while (*buf != '\0'&&  !isspace(*buf))
> -		buf++;
> -	return buf;
> -}
> -
> -static void get_marker_string(char *buf, char **start,
> -		char **end)
> -{
> -	*start = skip_spaces(buf);
> -	*end = skip_nonspaces(*start);
> -	**end = '\0';
> -}
> -*/
> -
>   int ltt_probe_register(struct ltt_available_probe *pdata)
>   {
>   	int ret = 0;
> @@ -235,158 +206,6 @@ end:
>   	return ret;
>   }
>
> -/*
> - * function handling proc entry write.
> - *
> - * connect<channel name>  <marker name>  [<probe name>]]
> - * disconnect<channel name>  <marker name>  [<probe name>]
> - */
> -//ust// static ssize_t ltt_write(struct file *file, const char __user *buffer,
> -//ust// 			   size_t count, loff_t *offset)
> -//ust// {
> -//ust// 	char *kbuf;
> -//ust// 	char *iter, *marker_action, *arg[4];
> -//ust// 	ssize_t ret;
> -//ust// 	int i;
> -//ust//
> -//ust// 	if (!count)
> -//ust// 		return -EINVAL;
> -//ust//
> -//ust// 	kbuf = vmalloc(count + 1);
> -//ust// 	kbuf[count] = '\0';		/* Transform into a string */
> -//ust// 	ret = copy_from_user(kbuf, buffer, count);
> -//ust// 	if (ret) {
> -//ust// 		ret = -EINVAL;
> -//ust// 		goto end;
> -//ust// 	}
> -//ust// 	get_marker_string(kbuf,&marker_action,&iter);
> -//ust// 	if (!marker_action || marker_action == iter) {
> -//ust// 		ret = -EINVAL;
> -//ust// 		goto end;
> -//ust// 	}
> -//ust// 	for (i = 0; i<  4; i++) {
> -//ust// 		arg[i] = NULL;
> -//ust// 		if (iter<  kbuf + count) {
> -//ust// 			iter++;			/* skip the added '\0' */
> -//ust// 			get_marker_string(iter,&arg[i],&iter);
> -//ust// 			if (arg[i] == iter)
> -//ust// 				arg[i] = NULL;
> -//ust// 		}
> -//ust// 	}
> -//ust//
> -//ust// 	if (!arg[0] || !arg[1]) {
> -//ust// 		ret = -EINVAL;
> -//ust// 		goto end;
> -//ust// 	}
> -//ust//
> -//ust// 	if (!strcmp(marker_action, "connect")) {
> -//ust// 		ret = ltt_marker_connect(arg[0], arg[1], arg[2]);
> -//ust// 		if (ret)
> -//ust// 			goto end;
> -//ust// 	} else if (!strcmp(marker_action, "disconnect")) {
> -//ust// 		ret = ltt_marker_disconnect(arg[0], arg[1], arg[2]);
> -//ust// 		if (ret)
> -//ust// 			goto end;
> -//ust// 	}
> -//ust// 	ret = count;
> -//ust// end:
> -//ust// 	vfree(kbuf);
> -//ust// 	return ret;
> -//ust// }
> -//ust//
> -//ust// static void *s_next(struct seq_file *m, void *p, loff_t *pos)
> -//ust// {
> -//ust// 	struct marker_iter *iter = m->private;
> -//ust//
> -//ust// 	marker_iter_next(iter);
> -//ust// 	if (!iter->marker) {
> -//ust// 		/*
> -//ust// 		 * Setting the iter module to -1UL will make sure
> -//ust// 		 * that no module can possibly hold the current marker.
> -//ust// 		 */
> -//ust// 		iter->module = (void *)-1UL;
> -//ust// 		return NULL;
> -//ust// 	}
> -//ust// 	return iter->marker;
> -//ust// }
> -//ust//
> -//ust// static void *s_start(struct seq_file *m, loff_t *pos)
> -//ust// {
> -//ust// 	struct marker_iter *iter = m->private;
> -//ust//
> -//ust// 	if (!*pos)
> -//ust// 		marker_iter_reset(iter);
> -//ust// 	marker_iter_start(iter);
> -//ust// 	if (!iter->marker) {
> -//ust// 		/*
> -//ust// 		 * Setting the iter module to -1UL will make sure
> -//ust// 		 * that no module can possibly hold the current marker.
> -//ust// 		 */
> -//ust// 		iter->module = (void *)-1UL;
> -//ust// 		return NULL;
> -//ust// 	}
> -//ust// 	return iter->marker;
> -//ust// }
> -//ust//
> -//ust// static void s_stop(struct seq_file *m, void *p)
> -//ust// {
> -//ust// 	marker_iter_stop(m->private);
> -//ust// }
> -//ust//
> -//ust// static int s_show(struct seq_file *m, void *p)
> -//ust// {
> -//ust// 	struct marker_iter *iter = m->private;
> -//ust//
> -//ust// 	seq_printf(m, "channel: %s marker: %s format: \"%s\" state: %d "
> -//ust// 		"event_id: %hu call: 0x%p probe %s : 0x%p\n",
> -//ust// 		iter->marker->channel,
> -//ust// 		iter->marker->name, iter->marker->format,
> -//ust// 		_imv_read(iter->marker->state),
> -//ust// 		iter->marker->event_id,
> -//ust// 		iter->marker->call,
> -//ust// 		iter->marker->ptype ? "multi" : "single",
> -//ust// 		iter->marker->ptype ?
> -//ust// 		(void*)iter->marker->multi : (void*)iter->marker->single.func);
> -//ust// 	return 0;
> -//ust// }
> -//ust//
> -//ust// static const struct seq_operations ltt_seq_op = {
> -//ust// 	.start = s_start,
> -//ust// 	.next = s_next,
> -//ust// 	.stop = s_stop,
> -//ust// 	.show = s_show,
> -//ust// };
> -//ust//
> -//ust// static int ltt_open(struct inode *inode, struct file *file)
> -//ust// {
> -//ust// 	/*
> -//ust// 	 * Iterator kept in m->private.
> -//ust// 	 * Restart iteration on all modules between reads because we do not lock
> -//ust// 	 * the module mutex between those.
> -//ust// 	 */
> -//ust// 	int ret;
> -//ust// 	struct marker_iter *iter;
> -//ust//
> -//ust// 	iter = kzalloc(sizeof(*iter), GFP_KERNEL);
> -//ust// 	if (!iter)
> -//ust// 		return -ENOMEM;
> -//ust//
> -//ust// 	ret = seq_open(file,&ltt_seq_op);
> -//ust// 	if (ret == 0)
> -//ust// 		((struct seq_file *)file->private_data)->private = iter;
> -//ust// 	else
> -//ust// 		kfree(iter);
> -//ust// 	return ret;
> -//ust// }
> -//ust//
> -//ust// static struct file_operations ltt_fops = {
> -//ust// 	.write = ltt_write,
> -//ust// 	.open = ltt_open,
> -//ust// 	.read = seq_read,
> -//ust// 	.llseek = seq_lseek,
> -//ust// 	.release = seq_release_private,
> -//ust// };
> -
>   static void disconnect_all_markers(void)
>   {
>   	struct ltt_active_marker *pdata, *tmp;
> @@ -406,11 +225,6 @@ void __attribute__((constructor)) init_marker_control(void)
>   	if(!initialized) {
>   		int ret;
>
> -//ust//	pentry = create_proc_entry("ltt", S_IRUSR|S_IWUSR, NULL);
> -//ust//	if (!pentry)
> -//ust//		return -EBUSY;
> -//ust//	markers_loaded_cachep = KMEM_CACHE(ltt_active_marker, 0);
> -
>   		ret = ltt_probe_register(&default_probe);
>   		BUG_ON(ret);
>   		ret = ltt_marker_connect("metadata", "core_marker_format",
> @@ -418,18 +232,15 @@ void __attribute__((constructor)) init_marker_control(void)
>   		BUG_ON(ret);
>   		ret = ltt_marker_connect("metadata", "core_marker_id", DEFAULT_PROBE);
>   		BUG_ON(ret);
> -//ust//	pentry->proc_fops =&ltt_fops;
>
>   		initialized = 1;
>   	}
>   }
> -//ust// module_init(marker_control_init);
>
>   static void __attribute__((destructor)) marker_control_exit(void)
>   {
>   	int ret;
>
> -//ust//	remove_proc_entry("ltt", NULL);
>   	ret = ltt_marker_disconnect("metadata", "core_marker_format",
>   				    DEFAULT_PROBE);
>   	BUG_ON(ret);
> @@ -439,11 +250,6 @@ static void __attribute__((destructor)) marker_control_exit(void)
>   	ret = ltt_probe_unregister(&default_probe);
>   	BUG_ON(ret);
>   	disconnect_all_markers();
> -//ust//	kmem_cache_destroy(markers_loaded_cachep);
> -//ust//	marker_synchronize_unregister();
> +
>   }
> -//ust// module_exit(marker_control_exit);
>
> -//ust// MODULE_LICENSE("GPL");
> -//ust// MODULE_AUTHOR("Mathieu Desnoyers");
> -//ust// MODULE_DESCRIPTION("Linux Trace Toolkit Marker Control");
> diff --git a/libust/marker.c b/libust/marker.c
> index cb8ffc1..1a9df8a 100644
> --- a/libust/marker.c
> +++ b/libust/marker.c
> @@ -118,7 +118,6 @@ notrace void __mark_empty_function(const struct marker *mdata,
>   	void *probe_private, struct registers *regs, void *call_private, const char *fmt, va_list *args)
>   {
>   }
> -//ust// EXPORT_SYMBOL_GPL(__mark_empty_function);
>
>   /*
>    * marker_probe_cb Callback that prepares the variable argument list for probes.
> @@ -141,7 +140,7 @@ notrace void marker_probe_cb(const struct marker *mdata,
>   	 * sure the teardown of the callbacks can be done correctly when they
>   	 * are in modules and they insure RCU read coherency.
>   	 */
> -//ust//	rcu_read_lock_sched_notrace();
> +
>   	ptype = mdata->ptype;
>   	if (likely(!ptype)) {
>   		marker_probe_func *func;
> @@ -179,9 +178,7 @@ notrace void marker_probe_cb(const struct marker *mdata,
>   			va_end(args);
>   		}
>   	}
> -//ust//	rcu_read_unlock_sched_notrace();
>   }
> -//ust// EXPORT_SYMBOL_GPL(marker_probe_cb);
>
>   /*
>    * marker_probe_cb Callback that does not prepare the variable argument list.
> @@ -197,7 +194,6 @@ static notrace void marker_probe_cb_noarg(const struct marker *mdata,
>   	va_list args;	/* not initialized */
>   	char ptype;
>
> -//ust//	rcu_read_lock_sched_notrace();
>   	ptype = mdata->ptype;
>   	if (likely(!ptype)) {
>   		marker_probe_func *func;
> @@ -230,7 +226,6 @@ static notrace void marker_probe_cb_noarg(const struct marker *mdata,
>   			multi[i].func(mdata, multi[i].probe_private, regs,
>   				call_private, mdata->format,&args);
>   	}
> -//ust//	rcu_read_unlock_sched_notrace();
>   }
>
>   static void free_old_closure(struct rcu_head *head)
> @@ -495,9 +490,7 @@ static int remove_marker(const char *channel, const char *name)
>   		free(e->format);
>   	ret = ltt_channels_unregister(e->channel);
>   	WARN_ON(ret);
> -	/* Make sure the call_rcu has been executed */
> -//ust//	if (e->rcu_pending)
> -//ust//		rcu_barrier_sched();
> +
>   	free(e);
>   	return 0;
>   }
> @@ -589,9 +582,6 @@ static int set_marker(struct marker_entry *entry, struct marker *elem,
>   			 * 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);
>   			ret = tracepoint_probe_register_noupdate(
>   				elem->tp_name,
>   				elem->tp_cb, NULL);
> @@ -603,8 +593,6 @@ static int set_marker(struct marker_entry *entry, struct marker *elem,
>   			 * 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));
>   		}
>   	}
>   	elem->state__imv = active;
> @@ -632,11 +620,6 @@ static void disable_marker(struct marker *elem)
>   		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));
>   	}
>   	elem->state__imv = 0;
>   	elem->single.func = __mark_empty_function;
> @@ -715,11 +698,9 @@ static void lib_update_markers(void)
>   	struct lib *lib;
>
>   	/* FIXME: we should probably take a mutex here on libs */
> -//ust//	pthread_mutex_lock(&module_mutex);
>   	list_for_each_entry(lib,&libs, list)
>   		marker_update_probe_range(lib->markers_start,
>   				lib->markers_start + lib->markers_count);
> -//ust//	pthread_mutex_unlock(&module_mutex);
>   }
>
>   /*
> @@ -741,15 +722,10 @@ static void lib_update_markers(void)
>    */
>   static void marker_update_probes(void)
>   {
> -	/* Core kernel markers */
> -//ust//	marker_update_probe_range(__start___markers, __stop___markers);
> -	/* Markers in modules. */
> -//ust//	module_update_markers();
>   	lib_update_markers();
>   	tracepoint_probe_update_all();
>   	/* Update immediate values */
>   	core_imv_update();
> -//ust//	module_imv_update(); /* FIXME: need to port for libs? */
>   	marker_update_processes();
>   }
>
> @@ -815,8 +791,6 @@ int marker_probe_register(const char *channel, const char *name,
>   	 * If we detect that a call_rcu is pending for this marker,
>   	 * make sure it's executed now.
>   	 */
> -//ust//	if (entry->rcu_pending)
> -//ust//		rcu_barrier_sched();
>   	old = marker_entry_add_probe(entry, probe, probe_private);
>   	if (IS_ERR(old)) {
>   		ret = PTR_ERR(old);
> @@ -834,13 +808,12 @@ int marker_probe_register(const char *channel, const char *name,
>   	entry = get_marker(channel, name);
>   	if (!entry)
>   		goto end;
> -//ust//	if (entry->rcu_pending)
> -//ust//		rcu_barrier_sched();
> +
>   	entry->oldptr = old;
>   	entry->rcu_pending = 1;
>   	/* write rcu_pending before calling the RCU callback */
>   	smp_wmb();
> -//ust//	call_rcu_sched(&entry->rcu, free_old_closure);
> +
>   	synchronize_rcu(); free_old_closure(&entry->rcu);
>   	goto end;
>
> @@ -854,7 +827,7 @@ end:
>   	pthread_mutex_unlock(&markers_mutex);
>   	return ret;
>   }
> -//ust// EXPORT_SYMBOL_GPL(marker_probe_register);
> +
>
>   /**
>    * marker_probe_unregister -  Disconnect a probe from a marker
> @@ -880,8 +853,7 @@ int marker_probe_unregister(const char *channel, const char *name,
>   	entry = get_marker(channel, name);
>   	if (!entry)
>   		goto end;
> -//ust//	if (entry->rcu_pending)
> -//ust//		rcu_barrier_sched();
> +
>   	old = marker_entry_remove_probe(entry, probe, probe_private);
>   	pthread_mutex_unlock(&markers_mutex);
>
> @@ -891,13 +863,12 @@ int marker_probe_unregister(const char *channel, const char *name,
>   	entry = get_marker(channel, name);
>   	if (!entry)
>   		goto end;
> -//ust//	if (entry->rcu_pending)
> -//ust//		rcu_barrier_sched();
> +
>   	entry->oldptr = old;
>   	entry->rcu_pending = 1;
>   	/* write rcu_pending before calling the RCU callback */
>   	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;
> @@ -905,7 +876,7 @@ end:
>   	pthread_mutex_unlock(&markers_mutex);
>   	return ret;
>   }
> -//ust// EXPORT_SYMBOL_GPL(marker_probe_unregister);
> +
>
>   static struct marker_entry *
>   get_marker_from_private_data(marker_probe_func *probe, void *probe_private)
> @@ -965,8 +936,7 @@ int marker_probe_unregister_private_data(marker_probe_func *probe,
>   		ret = -ENOENT;
>   		goto end;
>   	}
> -//ust//	if (entry->rcu_pending)
> -//ust//		rcu_barrier_sched();
> +
>   	old = marker_entry_remove_probe(entry, NULL, probe_private);
>   	channel = strdup(entry->channel);
>   	name = strdup(entry->name);
> @@ -978,13 +948,12 @@ int marker_probe_unregister_private_data(marker_probe_func *probe,
>   	entry = get_marker(channel, name);
>   	if (!entry)
>   		goto end;
> -//ust//	if (entry->rcu_pending)
> -//ust//		rcu_barrier_sched();
> +
>   	entry->oldptr = old;
>   	entry->rcu_pending = 1;
>   	/* write rcu_pending before calling the RCU callback */
>   	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);
> @@ -994,7 +963,6 @@ end:
>   	free(name);
>   	return ret;
>   }
> -//ust// EXPORT_SYMBOL_GPL(marker_probe_unregister_private_data);
>
>   /**
>    * marker_get_private_data - Get a marker's probe private data
> @@ -1044,37 +1012,6 @@ void *marker_get_private_data(const char *channel, const char *name,
>   	}
>   	return ERR_PTR(-ENOENT);
>   }
> -//ust// EXPORT_SYMBOL_GPL(marker_get_private_data);
> -
> -/**
> - * markers_compact_event_ids - Compact markers event IDs and reassign channels
> - *
> - * Called when no channel users are active by the channel infrastructure.
> - * Called with lock_markers() and channel mutex held.
> - */
> -//ust// void markers_compact_event_ids(void)
> -//ust// {
> -//ust// 	struct marker_entry *entry;
> -//ust// 	unsigned int i;
> -//ust// 	struct hlist_head *head;
> -//ust// 	struct hlist_node *node;
> -//ust// 	int ret;
> -//ust//
> -//ust// 	for (i = 0; i<  MARKER_TABLE_SIZE; i++) {
> -//ust// 		head =&marker_table[i];
> -//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// 			entry->channel_id = ret;
> -//ust// 			ret = _ltt_channels_get_event_id(entry->channel,
> -//ust// 							 entry->name);
> -//ust// 			WARN_ON(ret<  0);
> -//ust// 			entry->event_id = ret;
> -//ust// 		}
> -//ust// 	}
> -//ust// }
> -
> -//ust//#ifdef CONFIG_MODULES
>
>   /*
>    * Returns 0 if current not found.
> @@ -1085,7 +1022,6 @@ int lib_get_iter_markers(struct marker_iter *iter)
>   	struct lib *iter_lib;
>   	int found = 0;
>
> -//ust//	pthread_mutex_lock(&module_mutex);
>   	list_for_each_entry(iter_lib,&libs, list) {
>   		if (iter_lib<  iter->lib)
>   			continue;
> @@ -1099,7 +1035,7 @@ int lib_get_iter_markers(struct marker_iter *iter)
>   			break;
>   		}
>   	}
> -//ust//	pthread_mutex_unlock(&module_mutex);
> +
>   	return found;
>   }
>
> @@ -1123,7 +1059,7 @@ int marker_get_iter_range(struct marker **marker, struct marker *begin,
>   		return 1;
>   	return 0;
>   }
> -//ust// EXPORT_SYMBOL_GPL(marker_get_iter_range);
> +
>
>   static void marker_get_iter(struct marker_iter *iter)
>   {
> @@ -1148,7 +1084,6 @@ void marker_iter_start(struct marker_iter *iter)
>   {
>   	marker_get_iter(iter);
>   }
> -//ust// EXPORT_SYMBOL_GPL(marker_iter_start);
>
>   void marker_iter_next(struct marker_iter *iter)
>   {
> @@ -1160,19 +1095,19 @@ void marker_iter_next(struct marker_iter *iter)
>   	 */
>   	marker_get_iter(iter);
>   }
> -//ust// EXPORT_SYMBOL_GPL(marker_iter_next);
> +
>
>   void marker_iter_stop(struct marker_iter *iter)
>   {
>   }
> -//ust// EXPORT_SYMBOL_GPL(marker_iter_stop);
> +
>
>   void marker_iter_reset(struct marker_iter *iter)
>   {
>   	iter->lib = NULL;
>   	iter->marker = NULL;
>   }
> -//ust// EXPORT_SYMBOL_GPL(marker_iter_reset);
> +
>
>   #ifdef CONFIG_MARKERS_USERSPACE
>   /*
> @@ -1192,50 +1127,6 @@ static void free_user_marker(char __user *state, struct hlist_head *head)
>   }
>
>   /*
> - * Update current process.
> - * Note that we have to wait a whole scheduler period before we are sure that
> - * every running userspace threads have their markers updated.
> - * (synchronize_sched() can be used to insure this).
> - */
> -//ust// void marker_update_process(void)
> -//ust// {
> -//ust// 	struct user_marker *umark;
> -//ust// 	struct hlist_node *pos;
> -//ust// 	struct marker_entry *entry;
> -//ust//
> -//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,
> -//ust// 			&current->group_leader->user_markers, hlist) {
> -//ust// 		DBG("Updating marker %s in %s", umark->name, current->comm);
> -//ust// 		entry = get_marker("userspace", umark->name);
> -//ust// 		if (entry) {
> -//ust// 			if (entry->format&&
> -//ust// 				strcmp(entry->format, umark->format) != 0) {
> -//ust// 				WARN("error, wrong format in process %s",
> -//ust// 					current->comm);
> -//ust// 				break;
> -//ust// 			}
> -//ust// 			if (put_user(!!entry->refcount, umark->state)) {
> -//ust// 				WARN("Marker in %s caused a fault",
> -//ust// 					current->comm);
> -//ust// 				break;
> -//ust// 			}
> -//ust// 		} else {
> -//ust// 			if (put_user(0, umark->state)) {
> -//ust// 				WARN("Marker in %s caused a fault", current->comm);
> -//ust// 				break;
> -//ust// 			}
> -//ust// 		}
> -//ust// 	}
> -//ust// 	clear_thread_flag(TIF_MARKER_PENDING);
> -//ust// 	pthread_mutex_unlock(&current->group_leader->user_markers_mutex);
> -//ust// 	pthread_mutex_unlock(&markers_mutex);
> -//ust// }
> -
> -/*
>    * Called at process exit and upon do_execve().
>    * We assume that when the leader exits, no more references can be done to the
>    * leader structure by the other threads.
> @@ -1268,7 +1159,6 @@ int is_marker_enabled(const char *channel, const char *name)
>
>   	return entry&&  !!entry->refcount;
>   }
> -//ust// #endif
>
>   int marker_module_notify(struct notifier_block *self,
>   			 unsigned long val, void *data)
> @@ -1293,11 +1183,6 @@ struct notifier_block marker_module_nb = {
>   	.priority = 0,
>   };
>
> -//ust// static int init_markers(void)
> -//ust// {
> -//ust// 	return register_module_notifier(&marker_module_nb);
> -//ust// }
> -//ust// __initcall(init_markers);
>   /* TODO: call marker_module_nb() when a library is linked at runtime (dlopen)? */
>
>   #endif /* CONFIG_MODULES */
> @@ -1340,7 +1225,6 @@ void ltt_dump_marker_state(struct ust_trace *trace)
>   	}
>   	pthread_mutex_unlock(&markers_mutex);
>   }
> -//ust// EXPORT_SYMBOL_GPL(ltt_dump_marker_state);
>
>   static void (*new_marker_cb)(struct marker *) = NULL;
>
> @@ -1379,7 +1263,7 @@ int marker_register_lib(struct marker *markers_start, int markers_count)
>   	lib_update_markers();
>
>   	DBG("just registered a markers section from %p and having %d markers", markers_start, markers_count);
> -	
> +
>   	return 0;
>   }
>
> @@ -1393,7 +1277,7 @@ int marker_unregister_lib(struct marker *markers_start)
>   	lock_markers();
>
>   	/* FIXME: we should probably take a mutex here on libs */
> -//ust//	pthread_mutex_lock(&module_mutex);
> +
>   	list_for_each_entry(lib,&libs, list) {
>   		if(lib->markers_start == markers_start) {
>   			struct lib *lib2free = lib;
> diff --git a/libust/serialize.c b/libust/serialize.c
> index bd947ab..0bba97b 100644
> --- a/libust/serialize.c
> +++ b/libust/serialize.c
> @@ -237,9 +237,6 @@ repeat:
>   	case 'z':
>   		*trace_size = sizeof(size_t);
>   		break;
> -//ust//	case 't':
> -//ust//		*trace_size = sizeof(ptrdiff_t);
> -//ust//		break;
>   	case 'h':
>   		*trace_size = sizeof(short);
>   		break;
> @@ -347,9 +344,6 @@ repeat:
>   	case 'z':
>   		*c_size = sizeof(size_t);
>   		break;
> -//ust//	case 't':
> -//ust//		*c_size = sizeof(ptrdiff_t);
> -//ust//		break;
>   	case 'h':
>   		*c_size = sizeof(short);
>   		break;
> @@ -653,7 +647,7 @@ notrace void ltt_vtrace(const struct marker *mdata, void *probe_data,
>   	if (unlikely(ltt_traces.num_active_traces == 0))
>   		return;
>
> -	rcu_read_lock(); //ust// rcu_read_lock_sched_notrace();
> +	rcu_read_lock();
>   	cpu = ust_get_cpu();
>
>   	/* Force volatile access. */
> @@ -730,7 +724,6 @@ notrace void ltt_vtrace(const struct marker *mdata, void *probe_data,
>
>   		va_copy(args_copy, *args);
>   		/* FIXME : could probably encapsulate transport better. */
> -//ust//		buf = ((struct rchan *)channel->trans_channel_data)->buf[cpu];
>   		buf = channel->buf[cpu];
>   		/* Out-of-order write : header and data */
>   		buf_offset = ltt_write_event_header(channel, buf, buf_offset,
> @@ -749,7 +742,7 @@ notrace void ltt_vtrace(const struct marker *mdata, void *probe_data,
>   	tracer_stack_pos = stack_pos_ctx;
>   	STORE_SHARED(ltt_nesting, LOAD_SHARED(ltt_nesting) - 1);
>
> -	rcu_read_unlock(); //ust// rcu_read_unlock_sched_notrace();
> +	rcu_read_unlock();
>   }
>
>   notrace void ltt_trace(const struct marker *mdata, void *probe_data,
> diff --git a/libust/tracepoint.c b/libust/tracepoint.c
> index 6fe9cd7..d778737 100644
> --- a/libust/tracepoint.c
> +++ b/libust/tracepoint.c
> @@ -28,8 +28,6 @@
>   #define _LGPL_SOURCE
>   #include<urcu-bp.h>
>
> -//extern struct tracepoint __start___tracepoints[] __attribute__((visibility("hidden")));
> -//extern struct tracepoint __stop___tracepoints[] __attribute__((visibility("hidden")));
>
>   /* Set to 1 to enable tracepoint debug output */
>   static const int tracepoint_debug;
> @@ -66,7 +64,6 @@ struct tracepoint_entry {
>
>   struct tp_probes {
>   	union {
> -//ust//		struct rcu_head rcu;
>   		struct list_head list;
>   	} u;
>   	struct probe probes[0];
> @@ -79,17 +76,11 @@ static inline void *allocate_probes(int count)
>   	return p == NULL ? NULL : p->probes;
>   }
>
> -//ust// static void rcu_free_old_probes(struct rcu_head *head)
> -//ust// {
> -//ust// 	kfree(container_of(head, struct tp_probes, u.rcu));
> -//ust// }
> -
>   static inline void release_probes(void *old)
>   {
>   	if (old) {
>   		struct tp_probes *tp_probes = _ust_container_of(old,
>   			struct tp_probes, probes[0]);
> -//ust//		call_rcu_sched(&tp_probes->u.rcu, rcu_free_old_probes);
>   		synchronize_rcu();
>   		free(tp_probes);
>   	}
> @@ -313,11 +304,9 @@ static void lib_update_tracepoints(void)
>   {
>   	struct tracepoint_lib *lib;
>
> -//ust//	pthread_mutex_lock(&module_mutex);
>   	list_for_each_entry(lib,&libs, list)
>   		tracepoint_update_probe_range(lib->tracepoints_start,
>   				lib->tracepoints_start + lib->tracepoints_count);
> -//ust//	pthread_mutex_unlock(&module_mutex);
>   }
>
>   /*
> @@ -325,14 +314,10 @@ static void lib_update_tracepoints(void)
>    */
>   static void tracepoint_update_probes(void)
>   {
> -	/* Core kernel tracepoints */
> -//ust//	tracepoint_update_probe_range(__start___tracepoints,
> -//ust//		__stop___tracepoints);
>   	/* tracepoints in modules. */
>   	lib_update_tracepoints();
>   	/* Update immediate values */
>   	core_imv_update();
> -//ust//	module_imv_update();
>   }
>
>   static struct probe *
> @@ -375,7 +360,6 @@ int tracepoint_probe_register(const char *name, void *probe, void *data)
>   	release_probes(old);
>   	return 0;
>   }
> -//ust// EXPORT_SYMBOL_GPL(tracepoint_probe_register);
>
>   static void *tracepoint_remove_probe(const char *name, void *probe, void *data)
>   {
> @@ -418,7 +402,6 @@ int tracepoint_probe_unregister(const char *name, void *probe, void *data)
>   	release_probes(old);
>   	return 0;
>   }
> -//ust// EXPORT_SYMBOL_GPL(tracepoint_probe_unregister);
>
>   static LIST_HEAD(old_probes);
>   static int need_update;
> @@ -455,7 +438,6 @@ int tracepoint_probe_register_noupdate(const char *name, void *probe,
>   	pthread_mutex_unlock(&tracepoints_mutex);
>   	return 0;
>   }
> -//ust// EXPORT_SYMBOL_GPL(tracepoint_probe_register_noupdate);
>
>   /**
>    * tracepoint_probe_unregister_noupdate -  remove a probe but not disconnect
> @@ -479,7 +461,6 @@ int tracepoint_probe_unregister_noupdate(const char *name, void *probe,
>   	pthread_mutex_unlock(&tracepoints_mutex);
>   	return 0;
>   }
> -//ust// EXPORT_SYMBOL_GPL(tracepoint_probe_unregister_noupdate);
>
>   /**
>    * tracepoint_probe_update_all -  update tracepoints
> @@ -502,12 +483,10 @@ void tracepoint_probe_update_all(void)
>   	tracepoint_update_probes();
>   	list_for_each_entry_safe(pos, next,&release_probes, u.list) {
>   		list_del(&pos->u.list);
> -//ust//		call_rcu_sched(&pos->u.rcu, rcu_free_old_probes);
>   		synchronize_rcu();
>   		free(pos);
>   	}
>   }
> -//ust// EXPORT_SYMBOL_GPL(tracepoint_probe_update_all);
>
>   /*
>    * Returns 0 if current not found.
> @@ -518,7 +497,6 @@ int lib_get_iter_tracepoints(struct tracepoint_iter *iter)
>   	struct tracepoint_lib *iter_lib;
>   	int found = 0;
>
> -//ust//	pthread_mutex_lock(&module_mutex);
>   	list_for_each_entry(iter_lib,&libs, list) {
>   		if (iter_lib<  iter->lib)
>   			continue;
> @@ -532,7 +510,7 @@ int lib_get_iter_tracepoints(struct tracepoint_iter *iter)
>   			break;
>   		}
>   	}
> -//ust//	pthread_mutex_unlock(&module_mutex);
> +
>   	return found;
>   }
>
> @@ -557,22 +535,13 @@ int tracepoint_get_iter_range(struct tracepoint **tracepoint,
>   		return 1;
>   	return 0;
>   }
> -//ust// EXPORT_SYMBOL_GPL(tracepoint_get_iter_range);
>
>   static void tracepoint_get_iter(struct tracepoint_iter *iter)
>   {
>   	int found = 0;
>
> -//ust//	/* Core kernel tracepoints */
> -//ust//	if (!iter->module) {
> -//ust//		found = tracepoint_get_iter_range(&iter->tracepoint,
> -//ust//				__start___tracepoints, __stop___tracepoints);
> -//ust//		if (found)
> -//ust//			goto end;
> -//ust//	}
> -	/* tracepoints in libs. */
>   	found = lib_get_iter_tracepoints(iter);
> -//ust// end:
> +
>   	if (!found)
>   		tracepoint_iter_reset(iter);
>   }
> @@ -581,7 +550,6 @@ void tracepoint_iter_start(struct tracepoint_iter *iter)
>   {
>   	tracepoint_get_iter(iter);
>   }
> -//ust// EXPORT_SYMBOL_GPL(tracepoint_iter_start);
>
>   void tracepoint_iter_next(struct tracepoint_iter *iter)
>   {
> @@ -593,52 +561,15 @@ void tracepoint_iter_next(struct tracepoint_iter *iter)
>   	 */
>   	tracepoint_get_iter(iter);
>   }
> -//ust// EXPORT_SYMBOL_GPL(tracepoint_iter_next);
>
>   void tracepoint_iter_stop(struct tracepoint_iter *iter)
>   {
>   }
> -//ust// EXPORT_SYMBOL_GPL(tracepoint_iter_stop);
>
>   void tracepoint_iter_reset(struct tracepoint_iter *iter)
>   {
> -//ust//	iter->module = NULL;
>   	iter->tracepoint = NULL;
>   }
> -//ust// EXPORT_SYMBOL_GPL(tracepoint_iter_reset);
> -
> -//ust// #ifdef CONFIG_MODULES
> -
> -//ust// int tracepoint_module_notify(struct notifier_block *self,
> -//ust// 			     unsigned long val, void *data)
> -//ust// {
> -//ust// 	struct module *mod = data;
> -//ust//
> -//ust// 	switch (val) {
> -//ust// 	case MODULE_STATE_COMING:
> -//ust// 		tracepoint_update_probe_range(mod->tracepoints,
> -//ust// 			mod->tracepoints + mod->num_tracepoints);
> -//ust// 		break;
> -//ust// 	case MODULE_STATE_GOING:
> -//ust// 		tracepoint_update_probe_range(mod->tracepoints,
> -//ust// 			mod->tracepoints + mod->num_tracepoints);
> -//ust// 		break;
> -//ust// 	}
> -//ust// 	return 0;
> -//ust// }
> -
> -//ust// struct notifier_block tracepoint_module_nb = {
> -//ust// 	.notifier_call = tracepoint_module_notify,
> -//ust// 	.priority = 0,
> -//ust// };
> -
> -//ust// static int init_tracepoints(void)
> -//ust// {
> -//ust// 	return register_module_notifier(&tracepoint_module_nb);
> -//ust// }
> -//ust// __initcall(init_tracepoints);
> -
> -//ust// #endif /* CONFIG_MODULES */
>
>   static void (*new_tracepoint_cb)(struct tracepoint *) = NULL;
>
> diff --git a/libust/tracer.c b/libust/tracer.c
> index c9422c8..da6f914 100644
> --- a/libust/tracer.c
> +++ b/libust/tracer.c
> @@ -40,10 +40,6 @@
>   #include "tracer.h"
>   #include "usterr.h"
>
> -//ust// static void async_wakeup(unsigned long data);
> -//ust//
> -//ust// static DEFINE_TIMER(ltt_async_wakeup_timer, async_wakeup, 0, 0);
> -
>   /* Default callbacks for modules */
>   notrace int ltt_filter_control_default(enum ltt_filter_control_msg msg,
>   		struct ust_trace *trace)
> @@ -96,91 +92,6 @@ static enum ltt_channels get_channel_type_from_name(const char *name)
>   	return LTT_CHANNEL_UST;
>   }
>
> -/**
> - * ltt_module_register - LTT module registration
> - * @name: module type
> - * @function: callback to register
> - * @owner: module which owns the callback
> - *
> - * The module calling this registration function must ensure that no
> - * trap-inducing code will be executed by "function". E.g. vmalloc_sync_all()
> - * must be called between a vmalloc and the moment the memory is made visible to
> - * "function". This registration acts as a vmalloc_sync_all. Therefore, only if
> - * the module allocates virtual memory after its registration must it
> - * synchronize the TLBs.
> - */
> -//ust// int ltt_module_register(enum ltt_module_function name, void *function,
> -//ust// 		struct module *owner)
> -//ust// {
> -//ust// 	int ret = 0;
> -//ust//
> -//ust// 	/*
> -//ust// 	 * Make sure no page fault can be triggered by the module about to be
> -//ust// 	 * registered. We deal with this here so we don't have to call
> -//ust// 	 * vmalloc_sync_all() in each module's init.
> -//ust// 	 */
> -//ust// 	vmalloc_sync_all();
> -//ust//
> -//ust// 	switch (name) {
> -//ust// 	case LTT_FUNCTION_RUN_FILTER:
> -//ust// 		if (ltt_run_filter_owner != NULL) {
> -//ust// 			ret = -EEXIST;
> -//ust// 			goto end;
> -//ust// 		}
> -//ust// 		ltt_filter_register((ltt_run_filter_functor)function);
> -//ust// 		ltt_run_filter_owner = owner;
> -//ust// 		break;
> -//ust// 	case LTT_FUNCTION_FILTER_CONTROL:
> -//ust// 		if (ltt_filter_control_owner != NULL) {
> -//ust// 			ret = -EEXIST;
> -//ust// 			goto end;
> -//ust// 		}
> -//ust// 		ltt_filter_control_functor =
> -//ust// 			(int (*)(enum ltt_filter_control_msg,
> -//ust// 			struct ust_trace *))function;
> -//ust// 		ltt_filter_control_owner = owner;
> -//ust// 		break;
> -//ust// 	case LTT_FUNCTION_STATEDUMP:
> -//ust// 		if (ltt_statedump_owner != NULL) {
> -//ust// 			ret = -EEXIST;
> -//ust// 			goto end;
> -//ust// 		}
> -//ust// 		ltt_statedump_functor =
> -//ust// 			(int (*)(struct ust_trace *))function;
> -//ust// 		ltt_statedump_owner = owner;
> -//ust// 		break;
> -//ust// 	}
> -//ust//
> -//ust// end:
> -//ust//
> -//ust// 	return ret;
> -//ust// }
> -
> -/**
> - * ltt_module_unregister - LTT module unregistration
> - * @name: module type
> - */
> -//ust// void ltt_module_unregister(enum ltt_module_function name)
> -//ust// {
> -//ust// 	switch (name) {
> -//ust// 	case LTT_FUNCTION_RUN_FILTER:
> -//ust// 		ltt_filter_unregister();
> -//ust// 		ltt_run_filter_owner = NULL;
> -//ust// 		/* Wait for preempt sections to finish */
> -//ust// 		synchronize_sched();
> -//ust// 		break;
> -//ust// 	case LTT_FUNCTION_FILTER_CONTROL:
> -//ust// 		ltt_filter_control_functor = ltt_filter_control_default;
> -//ust// 		ltt_filter_control_owner = NULL;
> -//ust// 		break;
> -//ust// 	case LTT_FUNCTION_STATEDUMP:
> -//ust// 		ltt_statedump_functor = ltt_statedump_default;
> -//ust// 		ltt_statedump_owner = NULL;
> -//ust// 		break;
> -//ust// 	}
> -//ust//
> -//ust// }
> -
>   static LIST_HEAD(ltt_transport_list);
>
>   /**
> @@ -202,7 +113,6 @@ void ltt_transport_register(struct ltt_transport *transport)
>   	 * registered. We deal with this here so we don't have to call
>   	 * vmalloc_sync_all() in each module's init.
>   	 */
> -//ust//	vmalloc_sync_all();
>
>   	ltt_lock_traces();
>   	list_add_tail(&transport->node,&ltt_transport_list);
> @@ -253,40 +163,14 @@ static void trace_async_wakeup(struct ust_trace *trace)
>   	/* Must check each channel for pending read wakeup */
>   	for (i = 0; i<  trace->nr_channels; i++) {
>   		chan =&trace->channels[i];
> -		if (chan->active)
> -			trace->ops->wakeup_channel(chan);
> +		if (chan->active) {
> +			/* Currently wakeup_channel is a null pointer,
> +			   long term maybe look at removing or implemeting? */
> +			/* trace->ops->wakeup_channel(chan); */
> +		}
>   	}
>   }
>
> -//ust// /* Timer to send async wakeups to the readers */
> -//ust// static void async_wakeup(unsigned long data)
> -//ust// {
> -//ust// 	struct ust_trace *trace;
> -//ust//
> -//ust// 	/*
> -//ust// 	 * PREEMPT_RT does not allow spinlocks to be taken within preempt
> -//ust// 	 * disable sections (spinlock taken in wake_up). However, mainline won't
> -//ust// 	 * allow mutex to be taken in interrupt context. Ugly.
> -//ust// 	 * A proper way to do this would be to turn the timer into a
> -//ust// 	 * periodically woken up thread, but it adds to the footprint.
> -//ust// 	 */
> -//ust// #ifndef CONFIG_PREEMPT_RT
> -//ust// 	rcu_read_lock_sched();
> -//ust// #else
> -//ust// 	ltt_lock_traces();
> -//ust// #endif
> -//ust// 	list_for_each_entry_rcu(trace,&ltt_traces.head, list) {
> -//ust// 		trace_async_wakeup(trace);
> -//ust// 	}
> -//ust// #ifndef CONFIG_PREEMPT_RT
> -//ust// 	rcu_read_unlock_sched();
> -//ust// #else
> -//ust// 	ltt_unlock_traces();
> -//ust// #endif
> -//ust//
> -//ust// 	mod_timer(&ltt_async_wakeup_timer, jiffies + LTT_PERCPU_TIMER_INTERVAL);
> -//ust// }
> -
>   /**
>    * _ltt_trace_find - find a trace by given name.
>    * trace_name: trace name
> @@ -326,9 +210,6 @@ struct ust_trace *_ltt_trace_find_setup(const char *trace_name)
>    */
>   void ltt_release_transport(struct kref *kref)
>   {
> -//ust// 	struct ust_trace *trace = container_of(kref,
> -//ust// 			struct ust_trace, ltt_transport_kref);
> -//ust// 	trace->ops->remove_dirs(trace);
>   }
>
>   /**
> @@ -622,7 +503,7 @@ int ltt_trace_alloc(const char *trace_name)
>   	int err = 0;
>   	struct ust_trace *trace;
>   	unsigned int subbuf_size, subbuf_cnt;
> -//ust//	unsigned long flags;
> +
>   	int chan;
>   	const char *channel_name;
>
> @@ -642,9 +523,9 @@ int ltt_trace_alloc(const char *trace_name)
>
>   	kref_init(&trace->kref);
>   	kref_init(&trace->ltt_transport_kref);
> -//ust//	init_waitqueue_head(&trace->kref_wq);
> +
>   	trace->active = 0;
> -//ust//	get_trace_clock();
> +
>   	trace->freq_scale = trace_clock_freq_scale();
>
>   	if (!trace->transport) {
> @@ -652,24 +533,11 @@ int ltt_trace_alloc(const char *trace_name)
>   		err = -EINVAL;
>   		goto transport_error;
>   	}
> -//ust//	if (!try_module_get(trace->transport->owner)) {
> -//ust//		ERR("Can't lock transport module");
> -//ust//		err = -ENODEV;
> -//ust//		goto transport_error;
> -//ust//	}
>   	trace->ops =&trace->transport->ops;
>
> -//ust//	err = trace->ops->create_dirs(trace);
> -//ust//	if (err) {
> -//ust//		ERR("Can't create dir for trace %s", trace_name);
> -//ust//		goto dirs_error;
> -//ust//	}
> -
> -//ust//	local_irq_save(flags);
>   	trace->start_freq = trace_clock_frequency();
>   	trace->start_tsc = trace_clock_read64();
> -	gettimeofday(&trace->start_time, NULL); //ust// changed /* FIXME: is this ok? */
> -//ust//	local_irq_restore(flags);
> +	gettimeofday(&trace->start_time, NULL); /* FIXME: is this ok? */
>
>   	for (chan = 0; chan<  trace->nr_channels; chan++) {
>   		if (!(trace->channels[chan].active))
> @@ -693,13 +561,7 @@ int ltt_trace_alloc(const char *trace_name)
>   	}
>
>   	list_del(&trace->list);
> -//ust//	if (list_empty(&ltt_traces.head)) {
> -//ust//		mod_timer(&ltt_async_wakeup_timer,
> -//ust//				jiffies + LTT_PERCPU_TIMER_INTERVAL);
> -//ust//		set_kernel_trace_flag_all_tasks();
> -//ust//	}
>   	list_add_rcu(&trace->list,&ltt_traces.head);
> -//ust//	synchronize_sched();
>
>   	ltt_unlock_traces();
>
> @@ -710,43 +572,13 @@ create_channel_error:
>   		if (trace->channels[chan].active)
>   			trace->ops->remove_channel(&trace->channels[chan]);
>
> -//ust// dirs_error:
> -//ust//	module_put(trace->transport->owner);
>   transport_error:
> -//ust//	put_trace_clock();
> +
>   traces_error:
>   	ltt_unlock_traces();
>   	return err;
>   }
>
> -/*
> - * It is worked as a wrapper for current version of ltt_control.ko.
> - * We will make a new ltt_control based on debugfs, and control each channel's
> - * buffer.
> - */
> -//ust// static int ltt_trace_create(const char *trace_name, const char *trace_type,
> -//ust// 		enum trace_mode mode,
> -//ust// 		unsigned int subbuf_size_low, unsigned int n_subbufs_low,
> -//ust// 		unsigned int subbuf_size_med, unsigned int n_subbufs_med,
> -//ust// 		unsigned int subbuf_size_high, unsigned int n_subbufs_high)
> -//ust// {
> -//ust// 	int err = 0;
> -//ust//
> -//ust// 	err = ltt_trace_setup(trace_name);
> -//ust// 	if (IS_ERR_VALUE(err))
> -//ust// 		return err;
> -//ust//
> -//ust// 	err = ltt_trace_set_type(trace_name, trace_type);
> -//ust// 	if (IS_ERR_VALUE(err))
> -//ust// 		return err;
> -//ust//
> -//ust// 	err = ltt_trace_alloc(trace_name);
> -//ust// 	if (IS_ERR_VALUE(err))
> -//ust// 		return err;
> -//ust//
> -//ust// 	return err;
> -//ust// }
> -
>   /* Must be called while sure that trace is in the list. */
>   static int _ltt_trace_destroy(struct ust_trace *trace)
>   {
> @@ -764,15 +596,6 @@ static int _ltt_trace_destroy(struct ust_trace *trace)
>   	/* Everything went fine */
>   	list_del_rcu(&trace->list);
>   	synchronize_rcu();
> -	if (list_empty(&ltt_traces.head)) {
> -//ust//		clear_kernel_trace_flag_all_tasks();
> -		/*
> -		 * We stop the asynchronous delivery of reader wakeup, but
> -		 * we must make one last check for reader wakeups pending
> -		 * later in __ltt_trace_destroy.
> -		 */
> -//ust//		del_timer_sync(&ltt_async_wakeup_timer);
> -	}
>   	return 0;
>
>   	/* error handling */
> @@ -796,7 +619,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,
> @@ -813,17 +635,10 @@ static void __ltt_trace_destroy(struct ust_trace *trace, int drop)
>
>   	kref_put(&trace->ltt_transport_kref, ltt_release_transport);
>
> -//ust//	module_put(trace->transport->owner);
> -
>   	/*
>   	 * Wait for lttd readers to release the files, therefore making sure
>   	 * the last subbuffers have been read.
>   	 */
> -//ust//	if (atomic_read(&trace->kref.refcount)>  1) {
> -//ust//		int ret = 0;
> -//ust//		__wait_event_interruptible(trace->kref_wq,
> -//ust//			(atomic_read(&trace->kref.refcount) == 1), ret);
> -//ust//	}
>   	kref_put(&trace->kref, ltt_release_trace);
>   }
>
> @@ -843,7 +658,6 @@ int ltt_trace_destroy(const char *trace_name, int drop)
>   		ltt_unlock_traces();
>
>   		__ltt_trace_destroy(trace, drop);
> -//ust//		put_trace_clock();
>
>   		return 0;
>   	}
> @@ -874,18 +688,12 @@ static int _ltt_trace_start(struct ust_trace *trace)
>   	}
>   	if (trace->active)
>   		DBG("Tracing already active for trace %s", trace->trace_name);
> -//ust//	if (!try_module_get(ltt_run_filter_owner)) {
> -//ust//		err = -ENODEV;
> -//ust//		ERR("Cannot lock filter module");
> -//ust//		goto get_ltt_run_filter_error;
> -//ust//	}
>   	trace->active = 1;
>   	/* Read by trace points without protection : be careful */
>   	ltt_traces.num_active_traces++;
>   	return err;
>
>   	/* error handling */
> -//ust// get_ltt_run_filter_error:
>   traces_error:
>   	return err;
>   }
> @@ -914,13 +722,7 @@ int ltt_trace_start(const char *trace_name)
>
>   	ltt_dump_marker_state(trace);
>
> -//ust//	if (!try_module_get(ltt_statedump_owner)) {
> -//ust//		err = -ENODEV;
> -//ust//		ERR("Cannot lock state dump module");
> -//ust//	} else {
> -		ltt_statedump_functor(trace);
> -//ust//		module_put(ltt_statedump_owner);
> -//ust//	}
> +	ltt_statedump_functor(trace);
>
>   	return err;
>
> @@ -944,9 +746,8 @@ static int _ltt_trace_stop(struct ust_trace *trace)
>   	if (trace->active) {
>   		trace->active = 0;
>   		ltt_traces.num_active_traces--;
> -//ust//		synchronize_sched(); /* Wait for each tracing to be finished */
>   	}
> -//ust//	module_put(ltt_run_filter_owner);
> +
>   	/* Everything went fine */
>   	return 0;
>
> @@ -985,10 +786,7 @@ int ltt_filter_control(enum ltt_filter_control_msg msg, const char *trace_name)
>   		err = -ENOENT;
>   		goto trace_error;
>   	}
> -//ust//	if (!try_module_get(ltt_filter_control_owner)) {
> -//ust//		err = -ENODEV;
> -//ust//		goto get_module_error;
> -//ust//	}
> +
>   	switch (msg) {
>   	case LTT_FILTER_DEFAULT_ACCEPT:
>   		DBG("Proxy filter default accept %s", trace_name);
> @@ -1001,9 +799,7 @@ int ltt_filter_control(enum ltt_filter_control_msg msg, const char *trace_name)
>   	default:
>   		err = -EPERM;
>   	}
> -//ust//	module_put(ltt_filter_control_owner);
>
> -//ust// get_module_error:
>   trace_error:
>   	ltt_unlock_traces();
>   	return err;
> diff --git a/libust/tracer.h b/libust/tracer.h
> index c5df6ec..6421978 100644
> --- a/libust/tracer.h
> +++ b/libust/tracer.h
> @@ -101,7 +101,7 @@ struct ltt_active_marker {
>   	struct ltt_available_probe *probe;
>   };
>
> -struct marker; //ust//
> +struct marker;
>   extern void ltt_vtrace(const struct marker *mdata, void *probe_data,
>   	struct registers *regs, void *call_data, const char *fmt, va_list *args);
>   extern void ltt_trace(const struct marker *mdata, void *probe_data,
> diff --git a/libust/tracercore.c b/libust/tracercore.c
> index bbc8691..2cf9078 100644
> --- a/libust/tracercore.c
> +++ b/libust/tracercore.c
> @@ -39,8 +39,6 @@ void ltt_unlock_traces(void)
>   	pthread_mutex_unlock(&ltt_traces_mutex);
>   }
>
> -//ust// DEFINE_PER_CPU(unsigned int, ltt_nesting);
> -//ust// EXPORT_PER_CPU_SYMBOL(ltt_nesting);
>   __thread int ltt_nesting;
>
>   int ltt_run_filter_default(void *trace, uint16_t eID)
> diff --git a/libust/type-serializer.c b/libust/type-serializer.c
> index bf1c496..1ca7083 100644
> --- a/libust/type-serializer.c
> +++ b/libust/type-serializer.c
> @@ -63,8 +63,6 @@ void _ltt_specialized_trace(const struct marker *mdata, void *probe_data,
>   	list_for_each_entry_rcu(trace,&ltt_traces.head, list) {
>   		if (unlikely(!trace->active))
>   			continue;
> -//ust//		if (unlikely(!ltt_run_filter(trace, eID)))
> -//ust//			continue;
>   #ifdef CONFIG_LTT_DEBUG_EVENT_SIZE
>   		rflags = LTT_RFLAG_ID_SIZE;
>   #else

-- 
David Goulet
LTTng project, DORSAL Lab.

PGP/GPG : 1024D/16BD8563
BE3C 672B 9331 9796 291A  14C6 4AF7 C14B 16BD 8563




More information about the lttng-dev mailing list