Hello I am also working on a similar project about page caching for databases. I am also faced with similar issues as the OP. I have a workload that executes for several minutes and the traces that I manage to extract are only a few seconds long.
Exactly. OSv's tracepoints have two modes. One is indeed to save them in a ring buffer - so you'll see the last N traced events when you read that buffer - but other is a mode that just counts the events. What freq.py does is to retrieve the count at one second, then retrieve the count the next second - and the subtraction is the average number of this even per second. I don't understand your answer. How do you enable either of those modes ? I don't see any mention of such modes in the wiki ( https://github.com/cloudius-systems/osv/wiki/Trace-analysis-using-trace.py). /scripts/run.py only includes options to "enable" tracepoints but no way to choose between those modes. By default, it seems to me that the default is the first mode, recording events. In the code, I have not found any definition of a fixed size buffer for trace events. The only variable that seems relevant is trace_log_size defined in include/osv/trace.hh. It corresponds to the size of a ring-buffer for trace logging which you are also mentionning. However, this ring buffer seems to be used only by the strace functionality and not during "normal" tracing. I tried to increase the size of this ring-buffer but no change on the number of events collected as I expected. Could you enlighten me on this part ? As a comment, I believe what the OP meant by : "I made a workaround by adding my own stats class which record the sum and count because I need is the average number" refers to the sum of the run time of a function and the number of time the function is called to compute the average time of execution. This is exactly my use case and, while it is possible to use global variables, it would be nice to use the OSv functionalities if possible. As a side note regarding the wiki, I was mislead at first by the symbol resolution part. I understood that you could insert tracepoints in an application. Upon testing, I have found that the tracepoints can only be placed inside the kernel object files. The If it is all the same to you, I would probably like to propose a PR with modifications to the wiki to prevent this misunderstanding. Thanks in advance for your answers. Regards Ilya -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/90ce3b7e-96a3-44d0-a85d-82df7d2c2ab5n%40googlegroups.com.