Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000360XdebugUsage problemspublic2008-04-09 15:322011-09-26 10:50
Reporteroetting 
Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionno change required 
PlatformOSOS Version
Product Version 
Target Version2.2devFixed in Version 
Summary0000360: Function line number in profile not correct
DescriptionPlease consider the example script and profile below. In the part of the profile that describes the invocation of the function "func" the line number in the cost line is 6. This is the line from where it was called(as described in the cfn block for that function) and not the line where the function is defined.

http://valgrind.org/docs/manual/cl-format.html [^] section 3.1.2 paragraph 3 states:
"Thus, the first cost line specifies that in line 15 of source file "file.f" there is code belonging to function "main"."

As I understand that, the line number should point to code belonging to the function, just as the fl parameter is the file containing the function.


##### Script (line numbers added)
1 <?php
2 function func(){
3 1+1;
4 }
5
6 func();



##### Profile
version: 0.9.6
cmd: /Users/jacob/development/webdev/docroot/webgrind/test.php
part: 1

events: Time

fl=/Users/jacob/development/webdev/docroot/webgrind/test.php
fn=func
6 51

fl=/Users/jacob/development/webdev/docroot/webgrind/test.php
fn={main}

summary: 135

0 83
cfn=func
calls=1 0 0
6 51


TagsNo tags attached.
Operating SystemOS X
PHP Version5.2.4
Attached Files

- Relationships

-  Notes
(0001144)
toddw (reporter)
2009-11-20 03:21

This is annoying when using KCacheGrind, as after clicking on a function and then using the "Source Code" view, it takes you to the function call - instead of seeing the function definition.
(0001818)
derick (administrator)
2011-09-26 10:50

Xdebug 2.2-dev produces:

version: 1
creator: xdebug 2.1.2
cmd: /home/derick/dev/php/xdebug/tests/bug00360.php
part: 1
positions: line

events: Time

fl=/home/derick/dev/php/xdebug/tests/bug00360.php
fn=func
2 7


which seems correct.

- Issue History
Date Modified Username Field Change
2008-04-09 15:32 oetting New Issue
2009-11-20 03:21 toddw Note Added: 0001144
2010-03-20 23:47 derick Target Version => 2.2dev
2011-09-26 10:50 derick Note Added: 0001818
2011-09-26 10:50 derick Status new => resolved
2011-09-26 10:50 derick Resolution open => no change required
2011-09-26 10:50 derick Assigned To => derick


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker