sawsen11 / jrfonseca

Automatically exported from code.google.com/p/jrfonseca
0 stars 0 forks source link

[gprof2dot] Parse gprof output give all functions times 100% #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. parse gprof output with gprof2dot.py

What is the expected output? What do you see instead?
Expected to see normal time percents, but all functions have 100%

What version of the product are you using? On what operating system?
Python version 3.4.1
Windows Vista 64 bit

Please provide any additional information below.
It seems in method
 def parse(self)
   function[TIME] = entry.self
 should be replaced with
   function[TIME] = entry.percentage_time

Original issue reported on code.google.com by Terminat...@gmail.com on 28 May 2014 at 7:36

GoogleCodeExporter commented 9 years ago
I haven't seen this. Could you please provide the gprof input.

Original comment by Jose.R.F...@gmail.com on 28 May 2014 at 7:43

GoogleCodeExporter commented 9 years ago
attached file, you can feed it to gprof2dot.py

Original comment by Terminat...@gmail.com on 28 May 2014 at 8:18

Attachments:

GoogleCodeExporter commented 9 years ago
Yes, gprof2dot calculcates things based of absolutes times (self and chidren 
columns), and not percentages. As percentages have less data.

But your app goes so quickly that absolute time is zero.   You really need a 
test case that runs for longer.

See 
https://code.google.com/p/jrfonseca/wiki/Gprof2Dot#Why_there_is_no_output,_or_it
_is_all_in_the_same_color?

Original comment by Jose.R.F...@gmail.com on 28 May 2014 at 8:16