Results 1 to 6 of 6

Thread: Compiler optimization levels

  1. #1
    Join Date
    Apr 2012
    Posts
    119

    Question Compiler optimization levels

    I'm looking to do some automatic benchmarking of different optimization levels on a few of my computers, but I don't see a clear way of actually doing this with PTS. In some of the published tests I see different test identifiers with -O0, -O3, etc, but I don't actually see how PTS is changing the levels of optimization between the tests.

    Am I missing something?

  2. #2

    Default

    PTS honors any CFLAGS/CXXFLAGS set outside of the program so from there you can easily set the environment variables and the test profiles should use them when you use force-install to re-install the tests. Does that help you?

  3. #3
    Join Date
    Apr 2012
    Posts
    119

    Default

    Yes, that helps a lot. Thank you!

  4. #4
    Join Date
    Nov 2013
    Posts
    3

    Default Compiler optimization levels

    Quote Originally Posted by Michael View Post
    PTS honors any CFLAGS/CXXFLAGS set outside of the program so from there you can easily set the environment variables and the test profiles should use them when you use force-install to re-install the tests. Does that help you?

    i also encounter this issue. And what i want not only compile program in different levels but alse how much time dose each compile phrase cost?
    like
    compile in level -O1 cost 1s, and run cost 2s
    compile in level -O2 cost 3s, and run cost 1s
    compile in level -O3 cost 5s, and run cost 1s

    how can i do this using this test framework?
    thank you!

  5. #5

    Default

    Quote Originally Posted by empty_kai View Post
    i also encounter this issue. And what i want not only compile program in different levels but alse how much time dose each compile phrase cost?
    like
    compile in level -O1 cost 1s, and run cost 2s
    compile in level -O2 cost 3s, and run cost 1s
    compile in level -O3 cost 5s, and run cost 1s

    how can i do this using this test framework?
    thank you!
    Use tests like build-linux-kernel build-apache and build-imagemagick to see compile time examples for the different flags. then the other test profiles for seeing the run-time performance impact. see various phoronix articles as examples.

  6. #6
    Join Date
    Nov 2013
    Posts
    3

    Default

    Quote Originally Posted by Michael View Post
    Use tests like build-linux-kernel build-apache and build-imagemagick to see compile time examples for the different flags. then the other test profiles for seeing the run-time performance impact. see various phoronix articles as examples.
    really thanks for your answers.

    I also have fellowing questions?
    1. using test pts/build-php. when i veiw the test result in browser, in the tab system-logs--->environment-variables, there are
    PATH=....../bin/gcc
    CXXFLAGS=-O3
    CFLAGS=-O3
    ....
    whether this means I compile the pts/build-php using gcc -O3 flags?

    2. where was the pts/build-php compiled result? and how can i use it to test which flags of gcc(-O1 -O2 -O3) was have fastest running speed?
    3.can you give some links of articles about this? I can not find it easily.

    thank you very much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •