alex@bertha:~/src/cpython$ rm -rf /tmp/base; mkdir -p /tmp/base/{a..z}{000..999}; touch /tmp/base/{a..z}{000..999}/f
alex@bertha:~/src/cpython$ ls /tmp/base | wc -l
26000
alex@bertha:~/src/cpython$ rm getdirentries-perf.data
rm: cannot remove 'getdirentries-perf.data': No such file or directory
alex@bertha:~/src/cpython$ sudo perf record -o getdirentries-perf.data -F max ./python -c "import os; os.listdir('/tmp/base')"
info: Using a maximum frequency rate of 25,750 Hz
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.049 MB getdirentries-perf.data (868 samples) ]
alex@bertha:~/src/cpython$ sudo perf trace -S -i getdirentries-perf.data
Summary of events:
getdirentries-perf.data.gz