Hi,
I am writing a tracing back-end that logs tracepoint-based traces to
qemu-internal global buffers.
I had zeroed in on a lockless buffer for logging traces(to prevent
slowdowns 'cos of locks held while tracing). However, I'm not sure if
qemu threads might need some synchronisation to access the global trace
buffer.
I think the vcpu threads run lock-step, but this lock-step behaviour is
not guaranteed for some other types of threads, such as the aio helper
threads ? Also, can there be concurrency issues while tracing dynamic
translator ?
While I'm doing my study, it would be good to have some pointers on what
assumptions can / not be made for concurrent thread execution in qemu,
and what could be done to safeguard tracing in such hot-paths ?
Regards,
--
Prerna Saxena
Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India