Valgrind error - cannot open cache simulation output file

I am trying to profile my program with Valgrind :

valgrind --tool=callgrind --callgrind-out-file=/home/user/callgrind.%p --instr-atstart=no ./src/Leonardo --https leosd:11443

After I get to my file, where I have the target-profile function, I:

CALLGRIND_START_INSTRUMENTATION;

/* a lot of code to profile */

CALLGRIND_STOP_INSTRUMENTATION;
CALLGRIND_DUMP_STATS;

Program crash and console exit:

== 3117 == Error: Unable to open cache simulation output file `/home/user/callgrind.3117.1014 '

PS If I run valgrindfrom QtCreator with profiling from an application, it works fine, but I don't need it.

Any idea how to fix this? Unfortunately, Google does not help.

+4
source share
2 answers

, , run "run in terminal"

0

, ..

  • --callgrind-out-file
  • --instr-at-start = no
  • CALLGRIND_START/STOP_INSTRUMENTATION

, , :   valgrind --tool = callgrind your_program your_program_args

, , .

, " " - , . , Valgrind bugzilla, (//...)

-1
source

Source: https://habr.com/ru/post/1613834/


All Articles