Repository navigation
Alloc profile - #1873
Merged
Merged
Alloc profile#1873
Conversation
Reserve eight bytes per double-float element instead of four in the native compiler allocation path, preventing underallocation and writes beyond the allocated vector storage.
Pass unrounded segment lengths to LLVM, which already rounds address ranges to pages. Avoid changing permissions on an unrelated neighboring page when a segment starts at an unaligned address.
Compile out arena installation, trampoline generation and snapshot diagnostic messages together with their logging-only counters. Preserve allocation, fallback and snapshot behavior.
Expand ROOM with consistent GC statistics, current and peak RSS, retained object-file buffers, trampoline storage and measured GDB JIT payloads. Distinguish unavailable measurements and overlapping capacities from resident memory. Add -P/--no-gdb-jit and -H/--hpc, initialize their shared option from CLASP_NO_GDB_JIT, and use it across module and trampoline registration. Synchronize native accounting and tolerate object files awaiting materialization.
Register executable segments using their actual working-memory base. Merge adjacent or overlapping dynamic ranges with signal-safe atomic readers, increase capacity to 16K entries, and report usage and rejected registrations. Record CPU and allocation stack-walk termination evidence, expose summaries and optional detailed reports, and add Lisp-callable range and synthetic-frame regression tests. Annotate flamegraphs with range statistics, allocation totals and RSS, support multiline headers and with-cpu-profile, suppress lone nonadvancing-frame summaries, and reliably reset buffers after report generation.
this code is all slightly dodgy to begin with because LLVM only wants protectMappedMemory called on results from allocateMappedMemory which we're not using. It's just doing mprotect underneath so it's probably okay, but still. drmeister was hitting segfaults with the aligned up sizes, because the mprotect spilled into subsequent pages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bunch of changes to improve memory profiling and memory measurement.
Also a fix or two.