On Mon, 4 Apr 2022 18:15:42 +0300 Tzvetomir Stoyanov <tz.stoyanov@xxxxxxxxx> wrote: > The current approach to use the best available compression algorithm > by default is good enough, but personally I prefer the logic with > dynamically loading of these libraries. That way we can use the same > binary, which will simplify the trace-cmd packaging. And the first PoC > implementation of compression support was that way :) I disagree. How does it make it easier for packaging? Then you have the nightmare of having different compression algorithms on different machines depending on what is installed at run time. Because we pass around trace.dat files, and now you may not be able to read it if the other machine doesn't support it. I already hit this, and it is annoying. If the compressions are compile time dependent, then they will likely be added in the distro packaging. Which is what we want. That way, when people are not compiling their own trace-cmd, then all the trace-cmd of the same version they have will be able to create and read the trace.dat files that are passed around. If you make it a run time dependency, it will be a nightmare to keep it straight for the average user. And I don't want to deal with bug reports saying "I ran trace-cmd v3.1.3 on one machine, and trace-cmd v3.1.3 on another machine can't read the file". Sure, if you compile it yourself, it may not be supported (which is what I hit), but at least we guarantee that it will be supported across machines using the same distro if we make it compile time dependent. -- Steve