tmds / Tmds.LinuxAsync

MIT License
25 stars 3 forks source link

[WIP] Add tracing #55

Closed antonfirsov closed 4 years ago

antonfirsov commented 4 years ago

Asking for early feedback and sanity check.

The logic is modeled on NetEventSource which is a bit string-heavy when enabled, but I tried to remove boxing, and also added strongly typed events for lower level operations.

One major difference is that I added a static Log class to act as a facade to SocketEventSource.Log instead of having those methods in SocketEventSource as done in NetEventSource. This separation makes the code more maintainable IMO by making the call sites short and straightforward, and eliminating the need for [NonEvent] decorations.

So far only io_uring execution is decorated, I will proceed with the rest based on feedback.

Resolves #53.

tmds commented 4 years ago

@antonfirsov I just noticed this PR coincidentally.

Do you want @adamsitnik and I to have a look? Or is this still a wip?

antonfirsov commented 4 years ago

@tmds @adamsitnik yes please, I need general feedback on my approach before adding more code.

antonfirsov commented 4 years ago

Thanks to @adamsitnik, today I learned I was using PerfView the wrong way. I no longer think the extensive Enter/Exit/Info logging is useful, so I will reduce the verbosity focusing on low level steps like submissions/completions/wait only.

tmds commented 4 years ago

@antonfirsov do you plan to continue working on this? Maybe we should open up an issue and list some of the things we would like to learn from the tracing?

antonfirsov commented 4 years ago

@tmds yes I'd like to finish it, but maybe I need a fresh start, not sure. I opened #53 for the discussion, but we focused too much on how instead of what.

antonfirsov commented 4 years ago

I'm closing this, since a fresh PR would be much easier to review.