Bug 265886

Summary: KCacheGrind shows wrong calltree
Product: [Developer tools] kcachegrind Reporter: Sebastian Bergmann <sebastian>
Component: generalAssignee: Josef Weidendorfer <josef.weidendorfer>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Profile information from PHP/Xdebug that demonstrates the problem
Screenshot of KCacheGrind 0.5.1 correctly visualizing the profiling information from Xdebug
Screenshot of KCacheGrind 0.6 incorrectly visualizing the profiling information from Xdebug

Description Sebastian Bergmann 2011-02-09 15:49:04 UTC
Created attachment 57021 [details]
Profile information from PHP/Xdebug that demonstrates the problem

Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

I am using Xdebug to profile PHP code. Visualizing the profiling information, which is provided in cachegrind format, works fine with KCacheGrind 0.5.1 but does not work with KCacheGrind 0.6 (Ubuntu 10.10).

Reproducible: Always

Steps to Reproduce:
1. Start KCacheGrind
2. Load the attached profile
3. Look at the graph

Actual Results:  
The calltree is only shown for the current function.

Expected Results:  
The calltree is only shown for the whole application.
Comment 1 Sebastian Bergmann 2011-02-09 15:49:48 UTC
Created attachment 57022 [details]
Screenshot of KCacheGrind 0.5.1 correctly visualizing the profiling information from Xdebug
Comment 2 Sebastian Bergmann 2011-02-09 15:50:11 UTC
Created attachment 57023 [details]
Screenshot of KCacheGrind 0.6 incorrectly visualizing the profiling information from Xdebug
Comment 3 Josef Weidendorfer 2011-02-10 03:07:51 UTC
This is the same as bug 256425.
Xdebug generates wrong output.

This behavior is actually triggered by a bug fix.
If I could detect whether files are generated by Xdebug
it would be easier...

*** This bug has been marked as a duplicate of bug 256425 ***
Comment 4 Josef Weidendorfer 2011-02-10 03:17:36 UTC
Hmm... I just see that Xdebug also got the "version" field completely wrong.
That is for allowing extensions of the callgrind format. Anything different
from 1 (which is the default if this field is not given) should be rejected by
KCachegrind with a message such as:

"Only cachegrind/callgrind file dumps with format version 1 can be loaded
 by this version of KCachegrind. This file has format version '0.9.6'."

Is this any better than the current behaviour?