Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

startup: Print GC information #138

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

startup: Print GC information #138

wants to merge 4 commits into from

Commits on Jul 24, 2020

  1. startup: Add a printout for the number of GCs done during startup

    Now, we can get some idea for what is happening when Emacs is starting
    up.  Here we don't actually print any information about the *time* spent
    in GC, but we do get an idea for the number of GCs done.
    
    The Emacs garbage collector operates by finding and "marking" all Lisp
    objects that are still accessible to Lisp programs.  It assumes that all
    symbols and their associated values and function definitions, and things
    present on the stack are accessible.  Then any objects reachable through
    these presumed-accessible objects are also considered accessible.  After
    the process of markinging accessible Lisp objects is done, those left
    unmarked are garbage, and cannot be reached by normal means.
    
    It can be quite helpful to know how many GC operationss were performed
    during startup to see if the GC parameters are set properly.  On my
    system, for example, the gc-cons-threshold is merely 800_000 bytes (800
    KB).  This is the default for 64-bit systems, but results in 42 GC
    sweeps being performed during startup, which take a non-trivial amount
    of time.
    
    Signed-off-by: Kristofer Rye <[email protected]>
    rye committed Jul 24, 2020
    Configuration menu
    Copy the full SHA
    c5b9220 View commit details
    Browse the repository at this point in the history
  2. startup: Also print time spent during GC

    I think this is probably very useful for us to have in addition to the
    gcs-done printout.
    
    Signed-off-by: Kristofer Rye <[email protected]>
    rye committed Jul 24, 2020
    Configuration menu
    Copy the full SHA
    b9fb17b View commit details
    Browse the repository at this point in the history
  3. startup: Condense printout of GC timing information

    This makes it fit better on the screen, while still conveying the same
    amount of information.
    
    Signed-off-by: Kristofer Rye <[email protected]>
    rye committed Jul 24, 2020
    Configuration menu
    Copy the full SHA
    b03491a View commit details
    Browse the repository at this point in the history
  4. startup: Reduce the number of figures printed for gc time

    We don't really need to know how much time is spent in GC down to the
    microsecond.  Milliseconds (10^{-3}s) should be plenty of precision, as
    the user can always go and inspect gc-elapsed as they please.
    
    Signed-off-by: Kristofer Rye <[email protected]>
    rye committed Jul 24, 2020
    Configuration menu
    Copy the full SHA
    5a4678f View commit details
    Browse the repository at this point in the history