Hello,
Recently I needed vm benchmarks for different projects. I merged old Squeak benchmarks that were ported by Stefan Marr to SMark with some other classic benchmark I found on the web to have a suite. I am now setting up a benchmarking machine for our continuous integration server (running a bench on a VM is not accurate). You can find an image with the benchs here: https://ci.inria.fr/rmod/view/Mate/job/Pharo-bench/ , evaluate (SMarkVMBench run: 5) to try (takes a few dozens of seconds).
Currently I have:
- Richards: OS kernel simulation benchmark. The main focus is on property access and calling functions and methods. - DeltaBlue: One-way constraint solver Benchmark. The main focus is on polymorphism and object-oriented programming. - Stones: (Slopstone & Smopstone) Smalltalk Low level Operation Stones & Smalltalk Medium level Operation Stones, cpu intensive benchmarks - Loops: A set of microbenchmarks measuring basic aspects such as message send, instance field access, class var bindings, float and int arithmetic,and array access cost - Compiler: Evaluate the compilation time
Do you have any other benchs implemented in Squeak / Pharo ? If someone can extract the benchs from strongtalk in the Squeak chunk format I would be pleased. Seemingly you can only do that on windows and I don't have access to this kind of computer.
An interesting fact I wanted to mention: I run the benchs twice, once with cog before the last update (without frameless optimization) and once with the latest Cog, and I noticed a difference of 7% of performance on DeltaBlue and Richards. I don't use in this bench an excessive number of accessors (I mean I use accessors, but I don't use the policy where you use accessors inside the object's methods to access its instance variable). Is this an expected result with the frameless optimization ?
Hi Clément:
On 02 Oct 2013, at 08:46, Clément Bera bera.clement@gmail.com wrote:
Currently I have: • Richards: OS kernel simulation benchmark. The main focus is on property access and calling functions and methods. • DeltaBlue: One-way constraint solver Benchmark. The main focus is on polymorphism and object-oriented programming.
Cool, can we include them with SMark?
Do you have any other benchs implemented in Squeak / Pharo ? If someone can extract the benchs from strongtalk in the Squeak chunk format I would be pleased. Seemingly you can only do that on windows and I don't have access to this kind of computer.
There are also the ones from the Computer Language Benchmarks Game [1] in [2]
Best regards Stefan
[1] http://benchmarksgame.alioth.debian.org/ [2] http://smalltalkhub.com/#!/~StefanMarr/SMark/packages/CL-Benchmarks-Game
clement do you need a fixed machine for your slave? because I can find one :)
Stef On Oct 2, 2013, at 8:46 AM, Clément Bera bera.clement@gmail.com wrote:
Hello,
Recently I needed vm benchmarks for different projects. I merged old Squeak benchmarks that were ported by Stefan Marr to SMark with some other classic benchmark I found on the web to have a suite. I am now setting up a benchmarking machine for our continuous integration server (running a bench on a VM is not accurate). You can find an image with the benchs here: https://ci.inria.fr/rmod/view/Mate/job/Pharo-bench/ , evaluate (SMarkVMBench run: 5) to try (takes a few dozens of seconds).
Currently I have: Richards: OS kernel simulation benchmark. The main focus is on property access and calling functions and methods. DeltaBlue: One-way constraint solver Benchmark. The main focus is on polymorphism and object-oriented programming. Stones: (Slopstone & Smopstone) Smalltalk Low level Operation Stones & Smalltalk Medium level Operation Stones, cpu intensive benchmarks Loops: A set of microbenchmarks measuring basic aspects such as message send, instance field access, class var bindings, float and int arithmetic,and array access cost Compiler: Evaluate the compilation time Do you have any other benchs implemented in Squeak / Pharo ? If someone can extract the benchs from strongtalk in the Squeak chunk format I would be pleased. Seemingly you can only do that on windows and I don't have access to this kind of computer.
An interesting fact I wanted to mention: I run the benchs twice, once with cog before the last update (without frameless optimization) and once with the latest Cog, and I noticed a difference of 7% of performance on DeltaBlue and Richards. I don't use in this bench an excessive number of accessors (I mean I use accessors, but I don't use the policy where you use accessors inside the object's methods to access its instance variable). Is this an expected result with the frameless optimization ?
Hi Clément,
I have some of the computer benchmarks game benchmarks coded up in ShootoutTests in the Cog package. I use these for benchmarking. I'd love to see Richards & DeltaBlue added to them. IMO, Stones should be ignored totally, if not entirely crushed. It is a series of irrelevant microbenchmarks.
On Tue, Oct 1, 2013 at 11:46 PM, Clément Bera bera.clement@gmail.comwrote:
Hello,
Recently I needed vm benchmarks for different projects. I merged old Squeak benchmarks that were ported by Stefan Marr to SMark with some other classic benchmark I found on the web to have a suite. I am now setting up a benchmarking machine for our continuous integration server (running a bench on a VM is not accurate). You can find an image with the benchs here: https://ci.inria.fr/rmod/view/Mate/job/Pharo-bench/ , evaluate (SMarkVMBench run: 5) to try (takes a few dozens of seconds).
Currently I have:
- Richards: OS kernel simulation benchmark. The main focus is on
property access and calling functions and methods.
- DeltaBlue: One-way constraint solver Benchmark. The main focus is on
polymorphism and object-oriented programming.
- Stones: (Slopstone & Smopstone) Smalltalk Low level Operation Stones
& Smalltalk Medium level Operation Stones, cpu intensive benchmarks
- Loops: A set of microbenchmarks measuring basic aspects such as
message send, instance field access, class var bindings, float and int arithmetic,and array access cost
- Compiler: Evaluate the compilation time
Do you have any other benchs implemented in Squeak / Pharo ? If someone can extract the benchs from strongtalk in the Squeak chunk format I would be pleased. Seemingly you can only do that on windows and I don't have access to this kind of computer.
An interesting fact I wanted to mention: I run the benchs twice, once with cog before the last update (without frameless optimization) and once with the latest Cog, and I noticed a difference of 7% of performance on DeltaBlue and Richards. I don't use in this bench an excessive number of accessors (I mean I use accessors, but I don't use the policy where you use accessors inside the object's methods to access its instance variable). Is this an expected result with the frameless optimization ?
On Tue, Oct 1, 2013 at 11:46 PM, Clément Bera bera.clement@gmail.comwrote:
Do you have any other benchs implemented in Squeak / Pharo ? If someone can extract the benchs from strongtalk in the Squeak chunk format I would be pleased. Seemingly you can only do that on windows and I don't have access to this kind of computer.
We have Newspeak and Smalltalk versions of Strongtalk's DeltaBlue and Richards in https://bitbucket.org/newspeaklanguage/benchmarks. (In MemoryHole's format; load into a Newspeak image and you can output chunk format.) This version of DeltaBlue adheres to the original in its weird pattern of accessing the constant Strength values, which if you look at V8 or Dart's versions you will find rewritten.
It will be interesting to look at how Spur affects Splay (GC-heavy) and ParserCombinators (non-trivial amounts of string at:). We have Newspeak versions, but it would be nice to have Smalltalk versions as well.
Hey,
Stefan, you can integrate in SMark. There some classes that are here only for the jenkins, I don't know if you need them. See the image in the jenkins job I'll have a look at the benchs of Computer Language Benchmarks Game.
Stef, I need a machine reserved for benchs, we are working with Esteban on setting up one with one of our old mac.
Eliot, I agree that DeltaBlue and Richards were definitely the most useful in the suite I have. I can put them in the Cog repository but they rely on SMark, Stefan Mar's framework to bench. I don't know if you want to add this dependency in Cog. By the way I keep working on the Sista, but with 1 or 2 day of work per week it will take me a while to get back the infrastructure to work (I mean bytecode -> SSA -> bytecode). The bytecode to SSA decompiler doesn't support your blockClosure implementation and there's even more work in the SSA to bytecode generator. When it'll work I'll contact you back for the new bytecode set.
Ryan, I will have a look at Splay and ParserCombinator. There will definitely be a huge difference between the Spur version and the current version of Cog in these benchs.
2013/10/3 Ryan Macnak rmacnak@gmail.com
On Tue, Oct 1, 2013 at 11:46 PM, Clément Bera bera.clement@gmail.comwrote:
Do you have any other benchs implemented in Squeak / Pharo ? If someone can extract the benchs from strongtalk in the Squeak chunk format I would be pleased. Seemingly you can only do that on windows and I don't have access to this kind of computer.
We have Newspeak and Smalltalk versions of Strongtalk's DeltaBlue and Richards in https://bitbucket.org/newspeaklanguage/benchmarks. (In MemoryHole's format; load into a Newspeak image and you can output chunk format.) This version of DeltaBlue adheres to the original in its weird pattern of accessing the constant Strength values, which if you look at V8 or Dart's versions you will find rewritten.
It will be interesting to look at how Spur affects Splay (GC-heavy) and ParserCombinators (non-trivial amounts of string at:). We have Newspeak versions, but it would be nice to have Smalltalk versions as well.
On Oct 3, 2013, at 10:57 AM, Clément Bera bera.clement@gmail.com wrote:
Hey,
Stefan, you can integrate in SMark. There some classes that are here only for the jenkins, I don't know if you need them. See the image in the jenkins job I'll have a look at the benchs of Computer Language Benchmarks Game.
Stef, I need a machine reserved for benchs, we are working with Esteban on setting up one with one of our old mac.
Yes take a 15 inches in my office.
Eliot, I agree that DeltaBlue and Richards were definitely the most useful in the suite I have. I can put them in the Cog repository but they rely on SMark, Stefan Mar's framework to bench. I don't know if you want to add this dependency in Cog. By the way I keep working on the Sista, but with 1 or 2 day of work per week it will take me a while to get back the infrastructure to work (I mean bytecode -> SSA -> bytecode). The bytecode to SSA decompiler doesn't support your blockClosure implementation and there's even more work in the SSA to bytecode generator. When it'll work I'll contact you back for the new bytecode set.
Ryan, I will have a look at Splay and ParserCombinator. There will definitely be a huge difference between the Spur version and the current version of Cog in these benchs.
2013/10/3 Ryan Macnak rmacnak@gmail.com
On Tue, Oct 1, 2013 at 11:46 PM, Clément Bera bera.clement@gmail.com wrote: Do you have any other benchs implemented in Squeak / Pharo ? If someone can extract the benchs from strongtalk in the Squeak chunk format I would be pleased. Seemingly you can only do that on windows and I don't have access to this kind of computer.
We have Newspeak and Smalltalk versions of Strongtalk's DeltaBlue and Richards in https://bitbucket.org/newspeaklanguage/benchmarks. (In MemoryHole's format; load into a Newspeak image and you can output chunk format.) This version of DeltaBlue adheres to the original in its weird pattern of accessing the constant Strength values, which if you look at V8 or Dart's versions you will find rewritten.
It will be interesting to look at how Spur affects Splay (GC-heavy) and ParserCombinators (non-trivial amounts of string at:). We have Newspeak versions, but it would be nice to have Smalltalk versions as well.
Hi Clément,
On Thu, Oct 3, 2013 at 1:57 AM, Clément Bera bera.clement@gmail.com wrote:
Hey,
Stefan, you can integrate in SMark. There some classes that are here only for the jenkins, I don't know if you need them. See the image in the jenkins job I'll have a look at the benchs of Computer Language Benchmarks Game.
Stef, I need a machine reserved for benchs, we are working with Esteban on setting up one with one of our old mac.
Eliot, I agree that DeltaBlue and Richards were definitely the most useful in the suite I have. I can put them in the Cog repository but they rely on SMark, Stefan Mar's framework to bench. I don't know if you want to add this dependency in Cog.
Yes, please, go ahead. I can integrate them into the Shootout benchmarks I have and break the dependency if I need to.
By the way I keep working on the Sista, but with 1 or 2 day of work per week it will take me a while to get back the infrastructure to work (I mean bytecode -> SSA -> bytecode). The bytecode to SSA decompiler doesn't support your blockClosure implementation and there's even more work in the SSA to bytecode generator. When it'll work I'll contact you back for the new bytecode set.
OK, great. Don't worry; these things take time :-) I've waited three years to start work on Spur. As long as we get there in the end :-). Software seems to be an area where people keep claiming the end is nigh and a revolution is afoot. But cobol is still here ;-).
Ryan, I will have a look at Splay and ParserCombinator. There will
definitely be a huge difference between the Spur version and the current version of Cog in these benchs.
i do hope so :-)
2013/10/3 Ryan Macnak rmacnak@gmail.com
On Tue, Oct 1, 2013 at 11:46 PM, Clément Bera bera.clement@gmail.comwrote:
Do you have any other benchs implemented in Squeak / Pharo ? If someone can extract the benchs from strongtalk in the Squeak chunk format I would be pleased. Seemingly you can only do that on windows and I don't have access to this kind of computer.
We have Newspeak and Smalltalk versions of Strongtalk's DeltaBlue and Richards in https://bitbucket.org/newspeaklanguage/benchmarks. (In MemoryHole's format; load into a Newspeak image and you can output chunk format.) This version of DeltaBlue adheres to the original in its weird pattern of accessing the constant Strength values, which if you look at V8 or Dart's versions you will find rewritten.
It will be interesting to look at how Spur affects Splay (GC-heavy) and ParserCombinators (non-trivial amounts of string at:). We have Newspeak versions, but it would be nice to have Smalltalk versions as well.
Hello,
How can I have a username to commit to the Cog repository ? I can commit the benchs when I'll have authorization.
2013/10/3 Eliot Miranda eliot.miranda@gmail.com
Hi Clément,
On Thu, Oct 3, 2013 at 1:57 AM, Clément Bera bera.clement@gmail.comwrote:
Hey,
Stefan, you can integrate in SMark. There some classes that are here only for the jenkins, I don't know if you need them. See the image in the jenkins job I'll have a look at the benchs of Computer Language Benchmarks Game.
Stef, I need a machine reserved for benchs, we are working with Esteban on setting up one with one of our old mac.
Eliot, I agree that DeltaBlue and Richards were definitely the most useful in the suite I have. I can put them in the Cog repository but they rely on SMark, Stefan Mar's framework to bench. I don't know if you want to add this dependency in Cog.
Yes, please, go ahead. I can integrate them into the Shootout benchmarks I have and break the dependency if I need to.
By the way I keep working on the Sista, but with 1 or 2 day of work per week it will take me a while to get back the infrastructure to work (I mean bytecode -> SSA -> bytecode). The bytecode to SSA decompiler doesn't support your blockClosure implementation and there's even more work in the SSA to bytecode generator. When it'll work I'll contact you back for the new bytecode set.
OK, great. Don't worry; these things take time :-) I've waited three years to start work on Spur. As long as we get there in the end :-). Software seems to be an area where people keep claiming the end is nigh and a revolution is afoot. But cobol is still here ;-).
Ryan, I will have a look at Splay and ParserCombinator. There will
definitely be a huge difference between the Spur version and the current version of Cog in these benchs.
i do hope so :-)
2013/10/3 Ryan Macnak rmacnak@gmail.com
On Tue, Oct 1, 2013 at 11:46 PM, Clément Bera bera.clement@gmail.comwrote:
Do you have any other benchs implemented in Squeak / Pharo ? If someone can extract the benchs from strongtalk in the Squeak chunk format I would be pleased. Seemingly you can only do that on windows and I don't have access to this kind of computer.
We have Newspeak and Smalltalk versions of Strongtalk's DeltaBlue and Richards in https://bitbucket.org/newspeaklanguage/benchmarks. (In MemoryHole's format; load into a Newspeak image and you can output chunk format.) This version of DeltaBlue adheres to the original in its weird pattern of accessing the constant Strength values, which if you look at V8 or Dart's versions you will find rewritten.
It will be interesting to look at how Spur affects Splay (GC-heavy) and ParserCombinators (non-trivial amounts of string at:). We have Newspeak versions, but it would be nice to have Smalltalk versions as well.
-- best, Eliot
Hi David,
Clément is, amongst other things, working on Cog performance, looking at adaptive optimization/speculative inlining (Sista in Cog, for Speculative Inlining Smalltalk Architecture :-) ). Could he please be added as a developer to source.squeak.org/VMMaker?
On Fri, Oct 4, 2013 at 1:47 AM, Clément Bera bera.clement@gmail.com wrote:
Hello,
How can I have a username to commit to the Cog repository ? I can commit the benchs when I'll have authorization.
2013/10/3 Eliot Miranda eliot.miranda@gmail.com
Hi Clément,
On Thu, Oct 3, 2013 at 1:57 AM, Clément Bera bera.clement@gmail.comwrote:
Hey,
Stefan, you can integrate in SMark. There some classes that are here only for the jenkins, I don't know if you need them. See the image in the jenkins job I'll have a look at the benchs of Computer Language Benchmarks Game.
Stef, I need a machine reserved for benchs, we are working with Esteban on setting up one with one of our old mac.
Eliot, I agree that DeltaBlue and Richards were definitely the most useful in the suite I have. I can put them in the Cog repository but they rely on SMark, Stefan Mar's framework to bench. I don't know if you want to add this dependency in Cog.
Yes, please, go ahead. I can integrate them into the Shootout benchmarks I have and break the dependency if I need to.
By the way I keep working on the Sista, but with 1 or 2 day of work per week it will take me a while to get back the infrastructure to work (I mean bytecode -> SSA -> bytecode). The bytecode to SSA decompiler doesn't support your blockClosure implementation and there's even more work in the SSA to bytecode generator. When it'll work I'll contact you back for the new bytecode set.
OK, great. Don't worry; these things take time :-) I've waited three years to start work on Spur. As long as we get there in the end :-). Software seems to be an area where people keep claiming the end is nigh and a revolution is afoot. But cobol is still here ;-).
Ryan, I will have a look at Splay and ParserCombinator. There will
definitely be a huge difference between the Spur version and the current version of Cog in these benchs.
i do hope so :-)
2013/10/3 Ryan Macnak rmacnak@gmail.com
On Tue, Oct 1, 2013 at 11:46 PM, Clément Bera bera.clement@gmail.comwrote:
Do you have any other benchs implemented in Squeak / Pharo ? If someone can extract the benchs from strongtalk in the Squeak chunk format I would be pleased. Seemingly you can only do that on windows and I don't have access to this kind of computer.
We have Newspeak and Smalltalk versions of Strongtalk's DeltaBlue and Richards in https://bitbucket.org/newspeaklanguage/benchmarks. (In MemoryHole's format; load into a Newspeak image and you can output chunk format.) This version of DeltaBlue adheres to the original in its weird pattern of accessing the constant Strength values, which if you look at V8 or Dart's versions you will find rewritten.
It will be interesting to look at how Spur affects Splay (GC-heavy) and ParserCombinators (non-trivial amounts of string at:). We have Newspeak versions, but it would be nice to have Smalltalk versions as well.
-- best, Eliot
On Fri, Oct 04, 2013 at 06:54:38AM -0700, Eliot Miranda wrote:
Hi David,
Cl?ment is, amongst other things, working on Cog performance, looking at adaptive optimization/speculative inlining (Sista in Cog, for Speculative Inlining Smalltalk Architecture :-) ). Could he please be added as a developer to source.squeak.org/VMMaker?
Certainly!
Cl?ment,
Can you please add an account for yourself on http://source.squeak.org? I will then add you to the VMMaker project.
Thanks, Dave
Thanks!
On Fri, Oct 4, 2013 at 7:09 AM, David T. Lewis lewis@mail.msen.com wrote:
On Fri, Oct 04, 2013 at 06:54:38AM -0700, Eliot Miranda wrote:
Hi David,
Cl?ment is, amongst other things, working on Cog performance, looking
at
adaptive optimization/speculative inlining (Sista in Cog, for Speculative Inlining Smalltalk Architecture :-) ). Could he please be added as a developer to source.squeak.org/VMMaker?
Certainly!
Cl?ment,
Can you please add an account for yourself on http://source.squeak.org? I will then add you to the VMMaker project.
Thanks, Dave
Hey,
I added myself to source.squeak.org.
Thanks,
2013/10/4 Eliot Miranda eliot.miranda@gmail.com
Thanks!
On Fri, Oct 4, 2013 at 7:09 AM, David T. Lewis lewis@mail.msen.comwrote:
On Fri, Oct 04, 2013 at 06:54:38AM -0700, Eliot Miranda wrote:
Hi David,
Cl?ment is, amongst other things, working on Cog performance,
looking at
adaptive optimization/speculative inlining (Sista in Cog, for
Speculative
Inlining Smalltalk Architecture :-) ). Could he please be added as a developer to source.squeak.org/VMMaker?
Certainly!
Cl?ment,
Can you please add an account for yourself on http://source.squeak.org? I will then add you to the VMMaker project.
Thanks, Dave
-- best, Eliot
I added you to VMMaker.
Thanks, Dave
On Fri, Oct 04, 2013 at 10:10:06PM +0200, Cl?ment Bera wrote:
Hey,
I added myself to source.squeak.org.
Thanks,
2013/10/4 Eliot Miranda eliot.miranda@gmail.com
Thanks!
On Fri, Oct 4, 2013 at 7:09 AM, David T. Lewis lewis@mail.msen.comwrote:
On Fri, Oct 04, 2013 at 06:54:38AM -0700, Eliot Miranda wrote:
Hi David,
Cl?ment is, amongst other things, working on Cog performance,
looking at
adaptive optimization/speculative inlining (Sista in Cog, for
Speculative
Inlining Smalltalk Architecture :-) ). Could he please be added as a developer to source.squeak.org/VMMaker?
Certainly!
Cl?ment,
Can you please add an account for yourself on http://source.squeak.org? I will then add you to the VMMaker project.
Thanks, Dave
-- best, Eliot
On Tue, Oct 1, 2013 at 11:46 PM, Clément Bera bera.clement@gmail.comwrote:
Hello,
Recently I needed vm benchmarks for different projects. I merged old Squeak benchmarks that were ported by Stefan Marr to SMark with some other classic benchmark I found on the web to have a suite. I am now setting up a benchmarking machine for our continuous integration server (running a bench on a VM is not accurate). You can find an image with the benchs here: https://ci.inria.fr/rmod/view/Mate/job/Pharo-bench/ , evaluate (SMarkVMBench run: 5) to try (takes a few dozens of seconds).
Currently I have:
- Richards: OS kernel simulation benchmark. The main focus is on
property access and calling functions and methods.
- DeltaBlue: One-way constraint solver Benchmark. The main focus is on
polymorphism and object-oriented programming.
- Stones: (Slopstone & Smopstone) Smalltalk Low level Operation Stones
& Smalltalk Medium level Operation Stones, cpu intensive benchmarks
- Loops: A set of microbenchmarks measuring basic aspects such as
message send, instance field access, class var bindings, float and int arithmetic,and array access cost
- Compiler: Evaluate the compilation time
Do you have any other benchs implemented in Squeak / Pharo ? If someone can extract the benchs from strongtalk in the Squeak chunk format I would be pleased. Seemingly you can only do that on windows and I don't have access to this kind of computer.
An interesting fact I wanted to mention: I run the benchs twice, once with cog before the last update (without frameless optimization) and once with the latest Cog, and I noticed a difference of 7% of performance on DeltaBlue and Richards. I don't use in this bench an excessive number of accessors (I mean I use accessors, but I don't use the policy where you use accessors inside the object's methods to access its instance variable). Is this an expected result with the frameless optimization ?
You mean the better frameless optimization is 7% faster? I'm surprised its that much but yes, compiling more blocks and methds as frameless shoudl speed things up, but only a little. That's a nice result. If it's 7% slower I f***ed up.
Hey!
I also compared my "brand new" Pharo VM compiled with clang (LLVM 5 or whatever it is called, latest in Xcode 5) on Mac with the downloaded Mac binary from Eliot (2776) which I presume is... GCC 4.2?
Either way, the results using the bench image was more or less that they are within a few % of each other. The largest diff was Eliot's being around 10% faster on ... DeltaBlue I think?
But the point is - clang is obviously working!
Thanks Clément for that bench image, so nice with just an image sometimes. :)
regards, Göran
PS. I guess one could play the CC flags game indefinitely to find the best combo for clang, haven't tried.
PPS. Also tried using GCC 4.8.1 and 4.9, but then the compiled VM throws "Bus error: 10" at me. Note that it compiles using the switches for clang then... (Esteban and Igor - we need a nice way of switching compiler in CMakeVMMaker!)
Am 05.10.2013 um 11:48 schrieb Göran Krampe goran@krampe.se:
Hey! […] PPS. Also tried using GCC 4.8.1 and 4.9, but then the compiled VM throws "Bus error: 10" at me. Note that it compiles using the switches for clang then... (Esteban and Igor - we need a nice way of switching compiler in CMakeVMMaker!)
You typically do that with the CMake invocation yourself like in:
CC="clang -m32" CXX="clang++ -m32" cmake $SRCDIR cmake --build $BUILDDIR
or CC="gcc-4.9 -m32" CXX="g++-4.9 -m32" cmake $SRCDIR cmake --build $BUILDDIR
CMake then does compiler detection and should detect Clang/GCC and act accordingly. However, if there are special switches for either compiler, they should be in some CMake file and hence be generate by CMakeVMMaker…
See https://github.com/krono/self/blob/cmake/vm/cmake/platform.cmake#L65 for an example how to react to a found compiler (for example, i then used the platform_compiler variable to select files, but it's up to you)
Best -Tobias
igor got smahed by a flu over the last two weeks. Going back to life slowly.
On Oct 5, 2013, at 12:31 PM, Tobias Pape Das.Linux@gmx.de wrote:
Am 05.10.2013 um 11:48 schrieb Göran Krampe goran@krampe.se:
Hey! […] PPS. Also tried using GCC 4.8.1 and 4.9, but then the compiled VM throws "Bus error: 10" at me. Note that it compiles using the switches for clang then... (Esteban and Igor - we need a nice way of switching compiler in CMakeVMMaker!)
You typically do that with the CMake invocation yourself like in:
CC="clang -m32" CXX="clang++ -m32" cmake $SRCDIR cmake --build $BUILDDIR
or CC="gcc-4.9 -m32" CXX="g++-4.9 -m32" cmake $SRCDIR cmake --build $BUILDDIR
CMake then does compiler detection and should detect Clang/GCC and act accordingly. However, if there are special switches for either compiler, they should be in some CMake file and hence be generate by CMakeVMMaker…
See https://github.com/krono/self/blob/cmake/vm/cmake/platform.cmake#L65 for an example how to react to a found compiler (for example, i then used the platform_compiler variable to select files, but it's up to you)
Best -Tobias
Hope you feel better Igor!!
Ron Teitelbaum
-----Original Message----- From: vm-dev-bounces@lists.squeakfoundation.org [mailto:vm-dev- bounces@lists.squeakfoundation.org] On Behalf Of stephane ducasse Sent: Saturday, October 05, 2013 10:08 AM To: Squeak Virtual Machine Development Discussion Subject: Re: [Vm-dev] benchmarking and recent results
igor got smahed by a flu over the last two weeks. Going back to life slowly.
On Oct 5, 2013, at 12:31 PM, Tobias Pape Das.Linux@gmx.de wrote:
Am 05.10.2013 um 11:48 schrieb Göran Krampe goran@krampe.se:
Hey! [ ] PPS. Also tried using GCC 4.8.1 and 4.9, but then the compiled VM throws "Bus error: 10" at me. Note that it compiles using the switches for clang then... (Esteban and Igor - we need a nice way of switching compiler in CMakeVMMaker!)
You typically do that with the CMake invocation yourself like in:
CC="clang -m32" CXX="clang++ -m32" cmake $SRCDIR cmake --build $BUILDDIR
or CC="gcc-4.9 -m32" CXX="g++-4.9 -m32" cmake $SRCDIR cmake --build $BUILDDIR
CMake then does compiler detection and should detect Clang/GCC and act accordingly. However, if there are special switches for either compiler, they should be in some CMake file and hence be generate by CMakeVMMaker
See https://github.com/krono/self/blob/cmake/vm/cmake/platform.cmake#L65 for an example how to react to a found compiler (for example, i then used the platform_compiler variable to select files, but it's up to you)
Best -Tobias
On 10/05/2013 12:31 PM, Tobias Pape wrote:
Am 05.10.2013 um 11:48 schrieb Göran Krampe goran@krampe.se:
PPS. Also tried using GCC 4.8.1 and 4.9, but then the compiled VM throws "Bus error: 10" at me. Note that it compiles using the switches for clang then... (Esteban and Igor - we need a nice way of switching compiler in CMakeVMMaker!)
You typically do that with the CMake invocation yourself like in:
CC="clang -m32" CXX="clang++ -m32" cmake $SRCDIR cmake --build $BUILDDIR
Well, let me just say that the framework building the sources adds lots of switches for compiling the VM and also sometimes adjusts for different plugins etc.
regards, Göran
Am 05.10.2013 um 19:07 schrieb Göran Krampe goran@krampe.se:
On 10/05/2013 12:31 PM, Tobias Pape wrote:
Am 05.10.2013 um 11:48 schrieb Göran Krampe goran@krampe.se:
PPS. Also tried using GCC 4.8.1 and 4.9, but then the compiled VM throws "Bus error: 10" at me. Note that it compiles using the switches for clang then... (Esteban and Igor - we need a nice way of switching compiler in CMakeVMMaker!)
You typically do that with the CMake invocation yourself like in:
CC="clang -m32" CXX="clang++ -m32" cmake $SRCDIR cmake --build $BUILDDIR
Well, let me just say that the framework building the sources adds lots of switches for compiling the VM and also sometimes adjusts for different plugins etc.
Yes, clearly. The point is here, that CMake tries to match make insofar it respects the CC and CXX environment variables. That is, when you want to switch the compiler for CMake, you announce it by setting the environment variables[1] This should even work when CMake itself is run by a build script, so you say
CC="clang -m32" ./build.sh
All other switches should be unaffected by this.
Best -Tobias
[1] EXCEPT for the Xcode generator tool chain. Then you have to set some Xcode attributes like here: https://github.com/krono/self/blob/cmake/vm/cmake/mac_osx.cmake#L165
On 10/05/2013 07:25 PM, Tobias Pape wrote:
Am 05.10.2013 um 19:07 schrieb Göran Krampe goran@krampe.se:
On 10/05/2013 12:31 PM, Tobias Pape wrote:
Am 05.10.2013 um 11:48 schrieb Göran Krampe goran@krampe.se:
PPS. Also tried using GCC 4.8.1 and 4.9, but then the compiled VM throws "Bus error: 10" at me. Note that it compiles using the switches for clang then... (Esteban and Igor - we need a nice way of switching compiler in CMakeVMMaker!)
You typically do that with the CMake invocation yourself like in:
CC="clang -m32" CXX="clang++ -m32" cmake $SRCDIR cmake --build $BUILDDIR
Well, let me just say that the framework building the sources adds lots of switches for compiling the VM and also sometimes adjusts for different plugins etc.
Yes, clearly. The point is here, that CMake tries to match make insofar it respects the CC and CXX environment variables. That is, when you want to switch the compiler for CMake, you announce it by setting the environment variables[1] This should even work when CMake itself is run by a build script, so you say
CC="clang -m32" ./build.sh
All other switches should be unaffected by this.
Sure, but that is the whole problem :). The current sources generated by the Pharo setup has a range of switches that makes it compile fine with clang, specifically made for clang. (on OSX)
Now... if I throw in gcc 4.8.1 or 4.9, it produces a VM that bombs when I run it. I suspect it is because the specific combo of switches that makes clang dance (and Esteban reportedly did a lot of test-and-try to find that specific combo) also makes GCC produce bad VMs.
Granted, it could be some other reason. :)
But it would be nice to keep both sets of "working switches" in the code, instead of just a single set.
regards, Göran
Ah, that explains why Esteban did not find the same flags as me. http://smallissimo.blogspot.fr/2013/02/compiling-squeak-cog-virtual-machine-... I never understood he was not really using gcc but a facade to clang!
2013/10/5 Göran Krampe goran@krampe.se
On 10/05/2013 07:25 PM, Tobias Pape wrote:
Am 05.10.2013 um 19:07 schrieb Göran Krampe goran@krampe.se:
On 10/05/2013 12:31 PM, Tobias Pape wrote:
Am 05.10.2013 um 11:48 schrieb Göran Krampe goran@krampe.se:
PPS. Also tried using GCC 4.8.1 and 4.9, but then the compiled VM throws "Bus error: 10" at me. Note that it compiles using the switches for clang then... (Esteban and Igor - we need a nice way of switching compiler in CMakeVMMaker!)
You typically do that with the CMake invocation yourself like in:
CC="clang -m32" CXX="clang++ -m32" cmake $SRCDIR cmake --build $BUILDDIR
Well, let me just say that the framework building the sources adds lots of switches for compiling the VM and also sometimes adjusts for different plugins etc.
Yes, clearly. The point is here, that CMake tries to match make insofar it respects the CC and CXX environment variables. That is, when you want to switch the compiler for CMake, you announce it by setting the environment variables[1] This should even work when CMake itself is run by a build script, so you say
CC="clang -m32" ./build.sh
All other switches should be unaffected by this.
Sure, but that is the whole problem :). The current sources generated by the Pharo setup has a range of switches that makes it compile fine with clang, specifically made for clang. (on OSX)
Now... if I throw in gcc 4.8.1 or 4.9, it produces a VM that bombs when I run it. I suspect it is because the specific combo of switches that makes clang dance (and Esteban reportedly did a lot of test-and-try to find that specific combo) also makes GCC produce bad VMs.
Granted, it could be some other reason. :)
But it would be nice to keep both sets of "working switches" in the code, instead of just a single set.
regards, Göran
Sure, but that is the whole problem :). The current sources generated by the Pharo setup has a range of switches that makes it compile fine with clang, specifically made for clang. (on OSX)
Now... if I throw in gcc 4.8.1 or 4.9, it produces a VM that bombs when I run it. I suspect it is because the specific combo of switches that makes clang dance (and Esteban reportedly did a lot of test-and-try to find that specific combo) also makes GCC produce bad VMs.
Granted, it could be some other reason. :)
But it would be nice to keep both sets of "working switches" in the code, instead of just a single set.
Yes if you have some time it would be good to add that to the CMake generator. And yes esteban spent times to find a way that we get a VM with the latest compiler on mac to avoid to get stuck in the future and be force to install an old version of GCC Stef
On Sat, Oct 5, 2013 at 2:48 AM, Göran Krampe goran@krampe.se wrote:
Hey!
I also compared my "brand new" Pharo VM compiled with clang (LLVM 5 or whatever it is called, latest in Xcode 5) on Mac with the downloaded Mac binary from Eliot (2776) which I presume is... GCC 4.2?
4.2.1. You can check:
McStalker.~$ oscogvm/Cog.app/Contents/MacOS/Squeak -version 4.0 4.0.2776 Mac OS X built on Aug 22 2013 10:08:05 Compiler: 4.2.1 (Apple Inc. build 5666) (dot 3) [Production VM] CoInterpreter VMMaker.oscog-eem.331 uuid: 37d2e4b0-2f37-4e2d-8313-c63637785e59 Aug 22 2013 StackToRegisterMappingCogit VMMaker.oscog-eem.333 uuid: 84da9cb8-7f30-4cb7-b4fb-239a11f63b54 Aug 22 2013 VM: r2776 http://www.squeakvm.org/svn/squeak/branches/Cog Plugins: r2545 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins
Either way, the results using the bench image was more or less that they
are within a few % of each other. The largest diff was Eliot's being around 10% faster on ... DeltaBlue I think?
But the point is - clang is obviously working!
That's great news.
Thanks Clément for that bench image, so nice with just an image sometimes. :)
regards, Göran
PS. I guess one could play the CC flags game indefinitely to find the best combo for clang, haven't tried.
PPS. Also tried using GCC 4.8.1 and 4.9, but then the compiled VM throws "Bus error: 10" at me. Note that it compiles using the switches for clang then... (Esteban and Igor - we need a nice way of switching compiler in CMakeVMMaker!)
vm-dev@lists.squeakfoundation.org