andikleen / pmu-tools

Intel PMU profiling tools
GNU General Public License v2.0
2.04k stars 341 forks source link

toplev silently eats double dashes ("--") in tested program's command arguments #435

Closed minhuw closed 2 years ago

minhuw commented 2 years ago

I try to use toplev to analyze a program called dpdk-testpmd as shown below.

toplev -l3 dpdk-testpmd -l 0,2 -a 3b:00.0 -- -i --nb-cores=1 --nb-ports=1 --port-topology=loop --auto-start

However, dpdk-testpmd gives argument parsing errors telling that it receives an unrecognized argument -i. As dpdk-testpmd uses "--" to separate command line arguments for two components of the program, I suspect that "--" is eaten by toplev. I check argc and argv arguments in dpdk-testpmd's main function and validate that "--" disappears.

Is there any way to make toplev keep double dashes in the tested program's command arguments?