gsoc:2024-gsoc-perf

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gsoc:2024-gsoc-perf [2024/02/07 18:56]
irogers Fix formatting
gsoc:2024-gsoc-perf [2024/02/08 05:08] (current)
namhyung [Data type profiling]
Line 76: Line 76:
  
 Another improvement is that currently the ''​perf report''​ command will process an entire perf.data file before providing a visualization. This can be slow for large perf.data files. In contrast, the ''​perf top''​ command will gather data in the background while providing a visualization. Breaking apart the ''​perf report''​ command so that processing is performed on a background thread with the visualization periodically refreshing in the foreground will mean that at least during the slow load the user can do something. Another improvement is that currently the ''​perf report''​ command will process an entire perf.data file before providing a visualization. This can be slow for large perf.data files. In contrast, the ''​perf top''​ command will gather data in the background while providing a visualization. Breaking apart the ''​perf report''​ command so that processing is performed on a background thread with the visualization periodically refreshing in the foreground will mean that at least during the slow load the user can do something.
 +
 +One more thing can do is to reduce the number of file descriptors in ''​perf record''​ with ''​--threads''​ option. ​ Currently it needs a couple of pipes to communicate between the worker threads. ​ I think it can be greatly reduced by using eventfd(2) instead of having pipes for each thread.
 +
 +
 +==== Data type profiling ====
 +
 +  * complexity: intermediate or hard
 +  * duration: medium or large
 +  * requirements:​ physical machine to work and test on (Intel recommended). C programming,​ understanding DWARF format is a plus.
 +
 +Data type profiling is a new technique to show memory access profiles with type information. ​ See [[https://​lwn.net/​Articles/​955709/​ | LWN article]] for more detail. ​ It's still in the early stage and has a lot of room for improvement. ​ For example, it needs to support C++ and other languages, better integration to other perf commands like ''​annotate''​ and ''​c2c'',​ performance optimization,​ other architecture support and so on.  It'd be ok if you're not familiar with ELF or DWARF format.
 +
 +==== perf trace and BTF ====
 +
 +  * complexity: intermediate or hard
 +  * duration: medium or large
 +  * requirements:​ machine to work and test on. C programming,​ BPF
 +
 +''​perf trace''​ is similar to ''​strace''​ but much performant since it doesn'​t use ptrace. ​ So it needs to capture and understand the format of syscall arguments as ''​strace''​ does.  Right now, it has to build a list of format to pretty-print the syscall args.  But we find it limited and manual work.  Instead, it could use BTF (BPF type format) which has all the type information and is available in the (most) kernel.
  
gsoc/2024-gsoc-perf.1707332205.txt.gz · Last modified: 2024/02/07 18:56 by irogers