Opened 13 years ago

Closed 8 years ago

Last modified 6 years ago

#948 closed bug (fixed)

Incorrect Core transformations with cost centres

Reported by: simonmar Owned by: simonmar
Priority: normal Milestone: 7.4.1
Component: Profiling Version: 6.6
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Noticed during the hackathon: attached program has SCC annotations on non-top-level bindings, and these get moved around in the middle end such that the final profile is incorrect.

Attachments (1)

spaceleak.hs (835 bytes) - added by simonmar 13 years ago.

Download all attachments as: .zip

Change History (9)

Changed 13 years ago by simonmar

Attachment: spaceleak.hs added

comment:1 Changed 13 years ago by simonmar

Milestone: _|_

comment:2 Changed 13 years ago by simonmar

Also see the cg057 test, which is getting mis-transformed with -O in HEAD (15/12/2006).

comment:3 Changed 13 years ago by igloo

Frederik Eaton in http://www.haskell.org/pipermail/glasgow-haskell-bugs/2007-January/008125.html says:

Here is a test case showing poor results with '+RTS -xc'. The program
dies with error message:
<Wrappers.unsingleton,Main.CAF>sparse-test: Wrappers.hs:218:4-9: Assertion failed

Clearly, the 'stack trace' is incomplete, since Wrappers is not
imported directly by the main module (so I think there should be a few
intervening levels as well).

Here are commands to reproduce:

wget http://ofb.net/~frederik/ghc-xc-test.tar.gz
tar -xzf ghc-xc-test.tar.gz
cd sparse-work
./gen-ops && ./gen-foreignimports &&
g++ -g sparse_lib.cpp -c -o sparse_lib.o &&
ghc -prof -auto-all -fno-do-eta-reduction -fno-do-lambda-eta-expansion \
  -fno-case-merge -frules-off -fno-cse -fno-pre-inlining -fno-strictness \
  -fno-unbox-strict-fields --make sparse-test.hs sparse_lib.o -lm -lc -lstdc++
./sparse-test +RTS -xc

I've included all the '-fno-*' stuff on the ghc command line because I
thought it might help produce more information, but the problem occurs
without it.

comment:4 Changed 11 years ago by simonmar

Architecture: MultipleUnknown/Multiple

comment:5 Changed 11 years ago by simonmar

Operating System: MultipleUnknown/Multiple

comment:6 Changed 8 years ago by simonmar

Milestone: _|_7.4.1
Owner: set to simonmar
Type of failure: None/Unknown

comment:7 Changed 8 years ago by simonmar

Resolution: fixed
Status: newclosed

Now fixed, I believe. I can't reproduce the problem with the attached spaceleak test, and the URL for the other test case is now 404'd.

comment:8 Changed 6 years ago by Ian Lynagh <igloo@…>

In 54d7da3f5fb10ff7540ec2a6910cce82e6860259/ghc:

cg057 broken: trac #948. Also fix whitespace.
Note: See TracTickets for help on using tickets.