Announcement

Collapse
No announcement yet.

Compiler optimization levels

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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?
    Michael Larabel
    http://www.michaellarabel.com/

    Comment


    • #3
      Yes, that helps a lot. Thank you!

      Comment


      • #4
        Compiler optimization levels

        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!

        Comment


        • #5
          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.
          Michael Larabel
          http://www.michaellarabel.com/

          Comment


          • #6
            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.

            Comment

            Working...
            X