Ticket #405 (closed patch: fixed)

Opened 13 years ago

Last modified 13 years ago

amd64 --optimize

Reported by: adougherty Owned by: rurban
Priority: major Milestone: 1.0
Component: none Version: trunk
Severity: high Keywords: 64bit
Cc: Language:
Patch status: applied Platform:


This is a guess for a workaround that might make --optimized builds work on amd64. Could someone who has an amd64 system give it a spin and report back? If it works, could someone apply it?

Ideally, the entry should be conditional on arch == 'amd64', but I don't know how to do that in Parrot's Configure/build system.


diff -u parrot-0.9.1/config/gen/makefiles/CFLAGS.in parrot-andy/config/gen/makefiles/CFLAGS.in
--- parrot-0.9.1/config/gen/makefiles/CFLAGS.in 2009-02-17 15:42:16.000000000 -0500
+++ parrot-andy/config/gen/makefiles/CFLAGS.in  2009-03-04 20:38:44.000000000 -0500
@@ -11,6 +11,9 @@
 src/ops/core_ops_cg.c      -{@optimize@}    # takes too long
 src/ops/core_ops_switch.c  -{@optimize@}    # Overwhelms some compilers.

+# XXX TT ??? Paper over unknown problem on amd64
+src/gc/system.c  -{@optimize@}
 # io should be -Wunused clean
 {^src/io/}              s/-Wno-unused/-Wunused/


tt405-amd64-optimize.patch Download (1.2 KB) - added by rurban 13 years ago.
pass optimize to src/gc/system.c

Change History

Changed 13 years ago by rurban

pass optimize to src/gc/system.c

Changed 13 years ago by rurban

  • owner set to rurban
  • status changed from new to assigned

I adapted it to our build compiler. Thanks. Can someone on amd64 test this?

#IF(cpuarch==amd64):src/gc/system.c  -{@optimize@}

is the syntax and a target eq CFLAGS rule had to be added to genfile.

Changed 13 years ago by mikehh

I ran this with the patch provided by rurban. After trying the original patch, which also gave the same results.

I ran perl Configure,pl --optimize --test, make world and make test on Kubuntu Intrepid AMD64 with the latest updates and similarly for CPAN. Build at r37128.

This is the first time I have managed to get an --optimize(d) build on this platform.

The make test results are as follows:

Test Summary Report
t/pmc/exception.t                         (Wstat: 0 Tests: 31 Failed: 0)
  TODO passed:   30
t/pmc/packfile.t                          (Wstat: 256 Tests: 6 Failed: 1)
  Failed test:  6
  Non-zero exit status: 1
t/pmc/packfilesegment.t                   (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=396, Tests=11701, 371 wallclock secs ( 5.03 usr  1.44 sys + 124.89 cusr 55.41 csys = 186.77 CPU)
Result: FAIL
make: *** [test] Error 1


Michael (mikehh)

Changed 13 years ago by mikehh

Building without the --optimize (and without the patch) gives the same results.


I did not use make smoke with the --optimize build as the patch has not yet been applied.


Michael (mikehh)

Changed 13 years ago by rurban

  • status changed from assigned to closed
  • resolution set to fixed
  • patch changed from new to applied

thanks everybody for testing. applied as r37129

Changed 13 years ago by chromatic

The file's only 300 lines long, with four functions. An easy binary chop should determine which part's the problem (lines 94 - 115 look relevant).

Note: See TracTickets for help on using tickets.