To use kghostview with kcachegrind, using okular (supposing okular is installed, and kghostview is not) :
mkdir $HOME/bin
touche $HOME/bin/kghostview
edit the file, using vim for example :
vim $HOME/bin/kghostview
add :
#!/bin/bash
okular "$@"
save and close, and make it executable :
chmod +x $HOME/bin/kghostview
add it to your PATH :
export PATH=$HOME/bin/:$PATH
Now you can use KCacheGrind or other tools that need to use KGhostView, they will use okular instead.
Best regards
B. Leveugle