About benchmark in Linux


(Zeson Wu) #1

Hi, all.

I'd like to run benchmark in Linux, but it is an unsupported platform.

I followed the steps in README.md of benchmark in github,
https://github.com/apple/swift/tree/master/benchmark.

1 $ cd benchmark
2 $ mkdir build
3 $ cd build
4 $ cmake ..
5 $ make -j8 swift-benchmark-macosx-x86_64

I passed the 4th step and there is no interaction in step5 when I just
typed `make` simply, so I can not get the driver to run benchmark and I
decided to compile and run by myself.(Actually I just got Benchmark_Driver,
but it could not run with the error of `no such file` when execute child
process)

I also found there are some Darwin API and libraries being used in test
cases and I modified some by replacing with Glic import and other Unix API
such as ones in time.h.What's more, I built the library Foundation in
swift-corelib-foundation, which is widely used in test cases.

There were a lot of trouble when I compiled and linked the source file to
binary because of unfamiliar with Swift Driver.

Finally, I have modified all cases and made them passed compiling, but it
run crash because of arbitrary modifying. So I wanted to compile them with
-g option,but the driver always went wrong.

So is there any portable benchmark? How can I port benchmark with minimum
modifying in a convenient way?

Zeson


(Michael Gottesman) #2

Hi, all.

I'd like to run benchmark in Linux, but it is an unsupported platform.

I followed the steps in README.md of benchmark in github, https://github.com/apple/swift/tree/master/benchmark.

1 $ cd benchmark
2 $ mkdir build
3 $ cd build
4 $ cmake ..
5 $ make -j8 swift-benchmark-macosx-x86_64

I passed the 4th step and there is no interaction in step5 when I just typed `make` simply, so I can not get the driver to run benchmark and I decided to compile and run by myself.(Actually I just got Benchmark_Driver, but it could not run with the error of `no such file` when execute child process)

This is due to inadequacies in the standalone cmake script.

I also found there are some Darwin API and libraries being used in test cases and I modified some by replacing with Glic import and other Unix API such as ones in time.h.What's more, I built the library Foundation in swift-corelib-foundation, which is widely used in test cases.

There were a lot of trouble when I compiled and linked the source file to binary because of unfamiliar with Swift Driver.

Finally, I have modified all cases and made them passed compiling, but it run crash because of arbitrary modifying. So I wanted to compile them with -g option,but the driver always went wrong.

So is there any portable benchmark?

We currently do not support the benchmarks on Linux. Having it work on Linux is something that we would like in the future.

Patches/bug reports (bugs.swift.org) for both of these are welcome.

Michael

ยทยทยท

On Mar 4, 2016, at 2:13 AM, Zeson Wu via swift-users <swift-users@swift.org> wrote:

How can I port benchmark with minimum modifying in a convenient way?

Zeson

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users