I made a wrapper (using LD_PRELOAD) around XSelectInput that would trigger the signal 0.1 seconds after a keyboard/mouse (or other event) was received... Then it would dump stack traces every 0.1 seconds where "slow" UI code was being executed (before next call to XSelectInput).
As the article says, this is a low frequency sampling profiler, which means it comes with all the caveats of a sampling profiler, and interpreting its output. As a very crude tool, sure, but it is not an excuse to not learnt to use a profiler. Perf, instruments and UIForETW are simple enough to use that anyone who can follow the instructions in this blog past can pick up the basics in the same length of time.
https://devblogs.microsoft.com/oldnewthing/20050815-11/?p=34...
and by my implementation (for Linux) https://github.com/tialaramex/leakdice-rust or https://github.com/tialaramex/leakdice if you can't use Rust)
dzdt•1d ago
Brian_K_White•1d ago
But it needs the "it". "step in" alone or in any context where "it" isn't a mystery doesn't do it.
"step into the function" or "step into the hallway" doesn't do it even slightly.
The opposite even. In the case of "step into the hallway" where "step" does actually refer to literally using ones feet, saying step is a bit more sophisticated option for something like walk or go, invoking a sense of dancing vs merely relocating. So the "step in" is actually more elegant and tasteful.
Stepping into into or through a function doesn't invoke any dancing, merely the non-continuous, non-analog nature of the process.
But "here's where we stepped in it" has exactly the image and meaning he means.
Perhaps there is some other word in Russian that would do a better job of expressing something that proceeds in hard jumps? Maybe "step" was always just a too-literal translation from English or other languages because there is obviously a Russian word for "step"?
Is the 90-degree shape of stair called a step in Russian? Were instructions called steps in Russian before the western world put our own words for computer stuff into everyone else's languages overnight? Would a 400 year old document describe the recipe for a soup as a set of steps? In that case "step" was not merely a too-literal translation.
lelandfe•1d ago