Hi Robert,

some answers below.

On 05/17/2011 11:07 AM, Robert wrote:
Hi list,

I am new to rcu/ust, and trying to figure out how to use ust to trace programs. I don't know if it is right to post my problems here, since I didn't find any user mailing list.

I am using ust-0.12 and urcu-0.5.4 under linux 2.6.24 ubuntu 8.04.4
There are 3 problems:

1. Why in source code like /marker.c/ file, some rcu related code are annotated?
  e.g.,
//* Make sure the call_rcu has been executed *//
///ust// if (e->rcu_pending)/
///ust//         rcu_barrier_sched();/

   Then how ust do synchronization?

The reason these are commented out is that UST is a port of kernel code to userspace, so a lot of code for the kernel is still present.

As to how the synchronization works, Mathieu - can you answer this?

2. I am trying to trace some simple programs like pbzip2. I just find pthread_create call, and insert trace_mark() into the function that is invoked by pthread_create. But then I get segmentation fault. I cannot figure out why.
The code is like:
/trace_mark(ust, newevent, "ret is %d", 100);/

I don't see anything wrong with this. But maybe this version of UST was not as stable as it should be. You can try checking out the latest one from git if you want.


3. Actually I am not sure how to use libust. The manual as well as some other documents say that it is easy, just insert things like
/trace_mark(ust, myevent, "firstarg %d secondarg %s", v, st);/
into the code. But before that should I register or claim something? Specially, where can I find the definition of ust and myevent?

ust is a channel, the default channel for ust. A channel is a bit like an IO-stream, think of stdin for instance. myevent is the name of the marker itself. If you use ustctl list-markers <pid> you will see the markers that are present in your process.

/Nils

These are silly questions, but I cannot solve them.
Thanks in advance.

-- robert


_______________________________________________
ltt-dev mailing list
[email protected]
http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev

Reply via email to