sawsen11 / jrfonseca

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

generate wrong dot file for callgrind.out.xxx #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I use callgrind to generate a profiling file for a lua-based C server.

The main load is in the lua script, the callgrind profiling file also confirm 
this:
...
1662 fl=(10) /home/jzjian/lua/lua-5.2.3/test/simple/fullgc.c
1663 fn=(286) main
1664 3 3
1665 +1 1
1666 cfi=(11)
1667 cfn=(288) luaL_newstate
1668 calls=1 937
1669 * 100338
1670 * 1
1671 +2 2
1672 cfi=(22) /home/jzjian/lua/lua-5.2.3/src/linit.c
1673 cfn=(406) luaL_openlibs
1674 calls=1 +46
1675 * 388683
1676 +2 4
1677 cfi=(11)
1678 cfn=(632) luaL_loadfilex
1679 calls=1 631
1680 * 189795
1681 * 9
1682 cfi=(21)
1683 cfn=(1060) lua_pcallk
1684 calls=1 929
1685 * 1291
1686 * 1
1687 +2 2
1688 cfi=(39) /home/jzjian/lua/lua-5.2.3/test/simple/main.h
1689 cfn=(1074) fullgc
1690 calls=1 +8
1691 * 1344504177
1692 +2 1
1693 +1 2
...
the main load is in function fullgc, which executes the lua script, but the 
generated dot file is like this:
179     main -> fullgc [arrowsize="0.60", color="#0ba261", fontcolor="#0ba261", 
fontsize="10.00", label="35.69%\n1×", labeldistanc
180     main -> "luaL_loadfilex" [arrowsize="0.35", color="#0d2079", 
fontcolor="#0d2079", fontsize="10.00", label="4.54%\n1×", lab
181     main -> "luaL_newstate" [arrowsize="0.35", color="#0d2078", 
fontcolor="#0d2078", fontsize="10.00", label="4.43%\n1×", labe
182     main -> "luaL_openlibs" [arrowsize="0.71", color="#10b709", 
fontcolor="#10b709", fontsize="10.00", label="50.89%\n1×", lab
183     main -> "lua_pcallk" [arrowsize="0.35", color="#0d2078", 
fontcolor="#0d2078", fontsize="10.00", label="4.43%\n1×", labeldi

luaL_openlibs occupies 50.89% load and fullgc occupies only 35.69%.

Original issue reported on code.google.com by juzej...@gmail.com on 19 May 2014 at 9:00

GoogleCodeExporter commented 9 years ago
btw, the version of valgrind is 3.9.0, the version of lua is 5.2.3

Original comment by juzej...@gmail.com on 19 May 2014 at 9:54

GoogleCodeExporter commented 9 years ago
Please attach the callgrind.out, so I can easily repro the issue myself.

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

GoogleCodeExporter commented 9 years ago
sorry, my company forbid me to send file out of the internal network. please 
access the callgrind file here: http://www.wokeyi.org:8000/dl/fullgc.callgrind

Original comment by juzej...@gmail.com on 22 May 2014 at 3:15

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 201a4b4720b1.

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