I'm using callgrind to profile a small piece of code. Callgrind output files are well generated, their content looks ok, but I'm unable to open them with kcachegrind: I get the following error message:
Could not open file "callgrind.out.4953". Check it exists and you have enough permissions to read it.
I have all permissions on files and directories they are in, but with the same issue. Also, it works well with an other project, in an other folder in the same workspace. I also precise that the processes terminate correctly in both cases.
I recently reported to the kcachegrind developer a problem with exactly the same symptoms. The problem is triggered when callgrind is used with a very long command line. This was fixed in the next versions of valgrind/callgrind and kcachegrind. Find below the commit log for the valgrind side. Waiting for the new releases of valgrind and kcachegrind, if your problem is also due to a too long command line, you can just edit the file and truncate the cmd: line. If your problem is not the length of the cmd line, then I guess you will need to use callgrind_annotate (if this work) or further investigate why kcachegrind finds your file problematic.