#7246: Callstack depends on way (prof, profasm, profthreaded
-----------------------------------------+----------------------------------
Reporter: nomeata | Owner:
Type: bug | Status: new
Priority: normal | Component: Profiling
Version: 7.6.1 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: Incorrect result at runtime | Testcase:
Blockedby: | Blocking:
Related: |
-----------------------------------------+----------------------------------
Consider the attached test case. The expected output is the that of the
```prof``` way, while for ```profasm``` and ```profthreaded```, I get this
result:
{{{
=====> callstack003(profthreaded) 19 of 21 [0, 1, 0]
cd . && '/home/jojo/dokumente/Uni/info/ghc/inplace/bin/ghc-stage2'
-fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-
db -rtsopts -fno-ghci-history -o callstack003 callstack003.hs -O -prof
-auto-all -threaded -fprof-auto-calls -fno-full-laziness -fno-state-hack
>callstack003.comp.stderr 2>&1
cd . && ./callstack003 +RTS -p -RTS </dev/null >callstack003.run.stdout
2>callstack003.run.stderr
Actual stdout output differs from expected:
--- ./callstack003.stdout 2012-09-17 11:27:02.607458948 +0200
+++ ./callstack003.run.stdout 2012-09-17 12:20:33.988109494 +0200
@@ -1,8 +1,8 @@
-["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.doTwice
(callstack003.hs:10:15-17)","Main.f (callstack003.hs:7:11-36)"]
-["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.doTwice
(callstack003.hs:10:22-24)","Main.f (callstack003.hs:7:11-36)"]
-["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.doTwice
(callstack003.hs:10:15-17)","Main.f (callstack003.hs:7:11-36)"]
-["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.doTwice
(callstack003.hs:10:22-24)","Main.f (callstack003.hs:7:11-36)"]
-["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.doTwice
(callstack003.hs:10:15-17)","Main.f (callstack003.hs:7:11-36)"]
-["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.doTwice
(callstack003.hs:10:22-24)","Main.f (callstack003.hs:7:11-36)"]
-["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.doTwice
(callstack003.hs:10:15-17)","Main.f (callstack003.hs:7:11-36)"]
-["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.doTwice
(callstack003.hs:10:22-24)","Main.f (callstack003.hs:7:11-36)"]
+["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.f (callstack003.hs:7:11-36)"]
+["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.f (callstack003.hs:7:11-36)"]
+["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.f (callstack003.hs:7:11-36)"]
+["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.f (callstack003.hs:7:11-36)"]
+["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.f (callstack003.hs:7:11-36)"]
+["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.f (callstack003.hs:7:11-36)"]
+["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.f (callstack003.hs:7:11-36)"]
+["Main.CAF (<entire-module>)","Main.main
(callstack003.hs:9:8-21)","Main.doTwice
(callstack003.hs:10:15-24)","Main.f (callstack003.hs:7:11-36)"]
*** unexpected failure for callstack003(profthreaded)
}}}
Not sure if this really hurts anyone, and the behavior of the call stack
WRT recursive calls is anyways not quite perfect yet (see #7240), this
makes adding good test cases a bit difficult.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7246>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs