Menu

#5681 Instrument and improve GC time

Fixed
2020-02-05
2020-01-24
No

Setting GC_free_space_divisor to 1 decreases GC time on GUILE v2 from
2.1s to 1.75s, a 17% speedup for the Mozart horn concerto example

Don't try to tune the GUILE 1.8 GC if we are on GUILE 2.

https://codereview.appspot.com/573420043

Related

Issues: #5681

Discussion

  • Anonymous

    Anonymous - 2020-01-24
    • Description has changed:

    Diff:

    
    
    • Needs: -->
    • Patch: new --> needs_work
    • Type: -->
     
  • Anonymous

    Anonymous - 2020-01-24

    Fails make

    ...
    Making lily/out/main.o < cc
    Making lily/out/dynamic-align-engraver.o < cc
    Making lily/out/grob-info.o < cc
    Making lily/out/stencil-interpret.o < cc
    /home/james/lilypond-git/lily/main.cc: In function 'void setup_guile_v2_env()':
    /home/james/lilypond-git/lily/main.cc:769:6: error: 'GC_free_space_divisor' was not declared in this scope
          GC_free_space_divisor = 1;
          ^~~~~~~~~~~~~~~~~~~~~
    /home/james/lilypond-git/build/../stepmake/stepmake/c++-rules.make:4: recipe for target 'out/main.o' failed
    make[1]: *** [out/main.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    /home/james/lilypond-git/build/../stepmake/stepmake/generic-targets.make:6: recipe for target 'all' failed
    make: *** [all] Error 2
    
     
  • Han-Wen Nienhuys

     
  • Han-Wen Nienhuys

     
    • David Kastrup

      David Kastrup - 2020-01-27

      This one seems like an unrelated Rietveld issue?

       
  • Anonymous

    Anonymous - 2020-01-28
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -3,4 +3,4 @@
    
     Don&#39;t try to tune the GUILE 1.8 GC if we are on GUILE 2.
    
    -https://codereview.appspot.com/577380043
    +https://codereview.appspot.com/573420043
    
    • Needs: -->
    • Type: -->
     
  • Anonymous

    Anonymous - 2020-01-28
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2020-01-28

    Passes make, make check and a full make doc.

     
  • Anonymous

    Anonymous - 2020-01-31
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2020-01-31

    Patch on countdown for Feb 2nd

     
  • Anonymous

    Anonymous - 2020-02-02
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2020-02-02

    Patch counted down - please push.

     
  • Anonymous

    Anonymous - 2020-02-02
    • labels: --> Fixed_2_21_0
    • status: Started --> Fixed
    • Patch: push -->
     
  • Anonymous

    Anonymous - 2020-02-02
    GUILE2: Instrument and improve GC time
    author  Han-Wen Nienhuys <hanwen@lilypond.org>  
        Wed, 22 Jan 2020 22:26:38 +0000 (23:26 +0100)
    committer   Han-Wen Nienhuys <hanwen@lilypond.org>  
        Sun, 2 Feb 2020 13:28:27 +0000 (14:28 +0100)
    commit  7396352971b2452b2f1be93d6a161baf88f93cd5
    
     
  • Jonas Hahnfeld

    Jonas Hahnfeld - 2020-02-05

    Just found in gc's source code: The environment variable GC_FREE_SPACE_DIVISOR does the same, without creating a dependency on the library and with a possibility for the user to change the value.

     
    • Han-Wen Nienhuys

      Sure, we could use a sane_setenv call with overwrite = false. Send a patch?

      On Wed, Feb 5, 2020 at 12:36 PM Jonas Hahnfeld hahnjo@users.sourceforge.net
      wrote:

      Just found in gc's source code: The environment variable
      GC_FREE_SPACE_DIVISOR does the same, without creating a dependency on the
      library and with a possibility for the user to change the value.


      Status: Fixed
      Labels: Fixed_2_21_0
      Created: Fri Jan 24, 2020 09:48 AM UTC by Han-Wen Nienhuys
      Last Updated: Sun Feb 02, 2020 07:40 PM UTC
      Owner: Han-Wen Nienhuys

      Setting GC_free_space_divisor to 1 decreases GC time on GUILE v2 from
      2.1s to 1.75s, a 17% speedup for the Mozart horn concerto example

      Don't try to tune the GUILE 1.8 GC if we are on GUILE 2.

      https://codereview.appspot.com/573420043

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/testlilyissues/issues/5681/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Issues: #5681

      • David Kastrup

        David Kastrup - 2020-02-05

        "Han-Wen Nienhuys" hanwen@users.sourceforge.net writes:

        Sure, we could use a sane_setenv call with overwrite = false. Send a patch?

        That sounds quite preferable since it removes the gc.h dependency.

        --
        David Kastrup

         
        • Jonas Hahnfeld

          Jonas Hahnfeld - 2020-02-05

          We don't have this (yet), the code just does extern unsigned long GC_free_space_divisor;. But still I think it's a good idea because it allows the user to change it, should there ever be a need.

           
MongoDB Logo MongoDB