Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kapral18/9896f74dba02d3539a95fe41e4a7ccf0 to your computer and use it in GitHub Desktop.
Save kapral18/9896f74dba02d3539a95fe41e4a7ccf0 to your computer and use it in GitHub Desktop.

Revisions

  1. @listochkin listochkin created this gist Apr 17, 2014.
    58 changes: 58 additions & 0 deletions node-command-line-options.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,58 @@
    --log_gc (Log heap samples on garbage collection for the hp2ps tool.)
    type: bool default: false
    --expose_gc (expose gc extension)
    type: bool default: false
    --max_new_space_size (max size of the new generation (in kBytes))
    type: int default: 0
    --max_old_space_size (max size of the old generation (in Mbytes))
    type: int default: 0
    --max_executable_size (max size of executable memory (in Mbytes))
    type: int default: 0
    --gc_global (always perform global GCs)
    type: bool default: false
    --gc_interval (garbage collect after <n> allocations)
    type: int default: -1
    --trace_gc (print one trace line following each garbage collection)
    type: bool default: false
    --trace_gc_nvp (print one detailed trace line in name=value format after each garbage collection)
    type: bool default: false
    --trace_gc_ignore_scavenger (do not print trace line after scavenger collection)
    type: bool default: false
    --print_cumulative_gc_stat (print cumulative GC statistics in name=value format on exit)
    type: bool default: false
    --trace_gc_verbose (print more details following each garbage collection)
    type: bool default: false
    --trace_fragmentation (report fragmentation for old pointer and data pages)
    type: bool default: false
    --trace_external_memory (print amount of external allocated memory after each time it is adjusted.)
    type: bool default: false
    --collect_maps (garbage collect maps from which no objects can be reached)
    type: bool default: true
    --flush_code (flush code that we expect not to use again before full gc)
    type: bool default: true
    --incremental_marking (use incremental marking)
    type: bool default: true
    --incremental_marking_steps (do incremental marking steps)
    type: bool default: true
    --trace_incremental_marking (trace progress of the incremental marking)
    type: bool default: false
    --track_gc_object_stats (track object counts and memory usage)
    type: bool default: false
    --use_idle_notification (Use idle notification to reduce memory footprint.)
    type: bool default: true
    --use_ic (use inline caching)
    type: bool default: true
    --native_code_counters (generate extra code for manipulating stats counters)
    type: bool default: false
    --always_compact (Perform compaction on every full GC)
    type: bool default: false
    --lazy_sweeping (Use lazy sweeping for old pointer and data spaces)
    type: bool default: true
    --never_compact (Never perform compaction on full GC - testing only)
    type: bool default: false
    --compact_code_space (Compact code space on full non-incremental collections)
    type: bool default: true
    --incremental_code_compaction (Compact code space on full incremental collections)
    type: bool default: true
    --cleanup_code_caches_at_gc (Flush inline caches prior to mark compact collection and flush code caches in maps during mark compact cycle.)
    type: bool default: true
    19 changes: 19 additions & 0 deletions sample-interaction.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    $ node --expose-gc --trace-gc --log-gc
    [40433] 1397730668633 ms: Mark-sweep 0.5 (34.0) -> 0.5 (34.0) MB, 0 ms [Logger::LogCodeObjects] [GC in old space requested].
    [40433] 1397730668633 ms: Mark-sweep 0.5 (34.0) -> 0.4 (34.0) MB, 0 ms [Logger::LogCompiledFunctions] [GC in old space requested].
    > var a = [];
    [40433] 5200 ms: Scavenge 2.6 (37.0) -> 2.4 (37.0) MB, 1 ms [Runtime::PerformGC].
    undefined
    > for (var i = 0; i < 10000; i++) a.push('' + i);
    [40433] 42607 ms: Scavenge 3.6 (38.0) -> 3.2 (39.0) MB, 0 ms [Runtime::PerformGC].
    10000
    > a.length
    10000
    > a = null;
    null
    > global.gc();
    [40433] 68105 ms: Mark-sweep 3.6 (39.0) -> 2.8 (39.0) MB, 4 ms [gc extension] [GC in old space requested].
    undefined
    >
    (^C again to quit)
    >