Closed axeldavy closed 7 years ago
Currently, the profiler only supports valid ELF executables. I've logged a feature request so we can investigate adding support for scripts as well.
Also, I tried profiling /usr/bin/python2.7 and on my system (an Ubuntu 16.04 system), rcprof is able to profile it. I don't see the same "/usr/bin/python2.7 is not a valid application" error you reported.
I use archlinux.
Some applications get the "is not a valid application" error, some others don't. I figured out when I recompile applications I compiled a few months ago, they now get the "is not a valid application". I fail to find an explanation.
EDIT: with readelf It looks like the executable that get the error have the flag 'DYN' instead of 'EXEC'.
EDIT2: It looks like recent compilers have -pie default (which gives DYN). Enforcing -no-pie gives EXEC and rcprof runs. The correct fix should be have rcprof accept DYN too.
There was a change included in v5.2 which relaxes the check for a valid ELF executable. Could you try the 5.2 release to see if it works better for you?
I confirm the issue is fixed with the last version of CodeXL (2.5).
I close the issue.
I'd like to profile some python application with rcprof on linux. The python application uses pyopencl.
I don't know exactly how rcprof checks if it can execute the input program, but apparently what it does it too restrictive: /opt/AMDAPP/CodeXL/rcprof -o "/tmp/test.csv" -p -w "/tmp/" /usr/bin/python2.7 test.py /usr/bin/python2.7 is not a valid application
Similarly if I make test.py executable with chmod +x and add the correct prefix in the file, /opt/AMDAPP/CodeXL/rcprof -o "/tmp/test.csv" -p -w "/tmp/" test.py fails similarly.
On linux, it should be sufficient to just check for the execution bit.
Some other programs are successfully profiled with rcprof, thus it's not a faulty installation.