On Fri, 9 Apr 2021 16:47:25 +0300 Tzvetomir Stoyanov <tz.stoyanov@xxxxxxxxx> wrote: > On Fri, Apr 9, 2021 at 4:12 PM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote: > > > > On Fri, 9 Apr 2021 07:27:39 +0300 > > "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > > > > > Added new APIs for working with trace marker files of given instance. > > > Write strings in the trace_marker file: > > > tracefs_print_init(); > > > tracefs_printf(); > > > tracefs_vprintf(); > > > tracefs_print_close(); > > > Write binary data in trace_marker_raw file: > > > tracefs_binary_init(); > > > tracefs_binary_write(); > > > tracefs_binary_close(); > > > > Thanks Tzvetomir, this looks exactly like what I wanted. > > > > A few nits with the code, but I may take this series as is and then add > > these changes on top, since I want to get this library done this week. Let > > me know if you have any issues with what I plan on changing, or just let me > > know if you are OK with it. > > I'm OK with these changes. I was wondering about using a mutex to > protect the open, close and write, but decided to wait for your > changes that introduce the mutex and then to reuse it. Right. But as I stated, we don't want to protect the write itself, because we need to keep that as low overhead as possible, and just document that there's no protection with writing and the close. But multiple writes will work against opening and that's all that is needed. -- Steve