-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Heap snapshot #42286
Closed
Closed
Heap snapshot #42286
Changes from 106 commits
Commits
Show all changes
107 commits
Select commit
Hold shift + click to select a range
44a74ea
add empty files
vilterp e207adf
Initial dummy implementation
NHDaly 8e0c399
dummy print
NHDaly 2f591be
make dummy callable
NHDaly ae84768
Add us to the makefile
NHDaly 9084709
set up global heap snapshot and serializer function
vilterp 7b9e929
it builds!
vilterp 26f15c2
fix commas
vilterp e3713bb
add nodes; print addresses correctly
vilterp 208a5ea
fill out metadata header
vilterp ec48cff
factor out string table
vilterp 6e78dad
Remove stderr println in record_edge
vilterp 5fcdd6d
Plug the snapsshotter into GC fo real do
NHDaly e398fe0
add todos
vilterp 6db1ea5
direct output to a stream
vilterp 00506ca
fix commas
NHDaly 7671eff
rename to take_heap_snapshot
vilterp 612c6b8
add Julia wrapper function GC.take_heap_snapshot
vilterp cb0c809
Add commented out code for getting size once we know the type
NHDaly 3087e8f
Make every node an "object" type for now.
NHDaly c78e210
update hardcoded string tables
vilterp 632b52d
trying to get type but also seggfault
NHDaly ace0d4e
don't write out empty arrays which confuse chrome
vilterp 9471734
Re-enable the (Crashing) type
NHDaly 5990e8a
guard against nullptr types for non-objects
NHDaly aa635a6
Start to support size and name, but still crashing, so i commented out
NHDaly dfb017a
Print node/edge counts & fix memory leak & build warnings
NHDaly e77c09e
Use node indexes instead of IDs
NHDaly d567018
fixup writing indices correctly
NHDaly 81890b1
Added edge counts to the Node records
NHDaly e08f16b
DUH: OBJECTS NEED SIZES TO SHOW UP IN THE HEAP SNAPSHOT!
NHDaly be0491a
Get the size iff it's a datatype!! that's progress!
NHDaly 348b327
bugfix for DataType size
NHDaly 8d40da8
Tried adding the object type to the snapshots
NHDaly b6a4e86
get jl_value_t* from jl_taggedvalue_t*
vchuravy b923c90
Use jl_value_t* to get name and size
vchuravy 7f4b068
Pretty-print type names!!! :D
NHDaly e823805
JSON-escape strings before printing them
NHDaly 5b1277c
add assert (fails) that the edges are in order
NHDaly 1100ddb
add hacked fieldname to gc_debug_edge
NHDaly 02603d2
Change to the real format now that we understand it:
NHDaly 128eefb
Fix node_type and edge_type string table printing
NHDaly ff20542
Fix node_name and edge_name serialization
NHDaly 2044c6f
Add todo list
NHDaly b6a5b03
remove TODO on the bitwise or-ing, it isn't needed
NHDaly dea884c
Re-Split out the debug functions
NHDaly 62da715
better organize TODO
NHDaly 2a97716
Change all GC callsites to use newly named debug functions
NHDaly e02330c
Woohoo~ Restructured code to support last major changes
NHDaly 83f7da6
Implement Field Names!!!!!!!!! woohooo
NHDaly c2dcb53
Update TODO list
NHDaly 4f6a03c
Fix normal path GC code to only debug when enabled.
NHDaly 392c590
Fix major bug in field name string table indexing:
NHDaly 556c780
Fix some bugs with registering edges from Modules :)
NHDaly 3b83fd4
Handle field names of NamedTuples without crashing
NHDaly 6397269
rename _record_gc_node => _record_gc_edge
vilterp b01cd81
capture string and symbol values; tag them for viewer
vilterp fe63567
string and symbol sizes
vilterp 3337ba5
add gc annotations
vilterp fc77bfa
add gc-heap-snapshot.h to gc.o dependency list
vchuravy ad6f1d5
[GCHEAP] add JL_NOTSAFEPOINT
vchuravy 8b8cb43
Disable GC Snapshotting w/ inline check for performance
NHDaly 3e11756
mark the gc_heap_snapshot_enabled check __unlikely
NHDaly fc29e39
fix annotations on new inline funcs
NHDaly e612f29
revert to just type name
vilterp d9116bb
start adding roots
vilterp a1cee9e
function to add edges from uber root to roots
vilterp 8c3bb4a
add uber root and gc roots object
vilterp 6f7fd5a
attempt to add subroots node and edges
vilterp 21e0f7f
add internal_root
vchuravy 0daf9ac
Fix segfault in _gc_heap_snapshot_record_root()
NHDaly 8c84a64
fix edge count
vilterp dce89e9
make gc root recording conditional on heap snapshotting being on
vilterp 6805334
mark gc_heap_snapshot_record_root as JL_NOTSAFEPOINT
vilterp bed9004
better property names for gc roots
vilterp 5e801cb
Apply suggestions from code review
NHDaly c470ea9
more PR feedback
vilterp a1f0988
comments pointing at at Node source
vilterp 4266a5c
use ios_t instead of JL_STREAM
vilterp 47fe30d
print full types
vilterp ae7bf34
array sizes
vilterp e047ef3
try marking roots in mark_enqueued_tasks
vilterp 188ed05
add internal edges when scanning the stack
vilterp a540560
Halfway through draft commit to construct full fieldpath from slot
NHDaly 59b0eda
Start hooking up the field paths
NHDaly 152ad15
connect up the code from before (but it's still not working)
NHDaly ddd07ad
Add debug logging for objects in `Main` module
NHDaly 2da28df
Fix silly mistake in slot accounting :)
NHDaly 09ddcd4
Clean up debug logs
NHDaly bd87eea
represent stack frames as nodes; only root running tasks
vilterp 83afa81
tweak comment
vilterp ba4ea3f
Fixups, comments, todos
NHDaly 9c04a81
fix merge conflict
NHDaly d43ca3a
Fix Tuple types in fieldpath_for_slot
NHDaly ee74794
Add TODO about overrunning type printing buffer
NHDaly 0caead0
remove log
NHDaly a1f1501
Avoid recollect which might have been mucking our results
NHDaly 95b4592
Hacky fix to make sure we get full marks in GC:
NHDaly b441c95
Make type string buffer 1MiB to (try to) avoid buffer overflow
NHDaly 7fa3781
unbreak heap-snapshot.cpp
vilterp fb4fbd3
unbreak partr.c
vilterp 6ab9e15
remove println
vilterp e8b32da
put things back I accidentally removed in the rebase
vilterp 00f5451
add wrapper function
vilterp 227cf9b
Merge branch 'master' into pv-heap-snapshot
vilterp 07b3ba1
fix syntax error in makefile
vilterp e732d48
Fix copy/paste typos in gc_heap_snapshot_record_roots for jl_gc_queue…
NHDaly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried that earlier, but it seems not to be defined yet:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this made the builds fail, e.g. https://build.julialang.org/#/builders/63/builds/3778/steps/8/logs/stdio
either we need to get IOStream in scope somehow, or take the annotation back off
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taking the annotation back off until we can figure out how to get it in scope in this file… I guess we have to figure out what file
IOStream
is defined in and make sure it gets included before thisThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this one has been resolved, yeah?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still may be good to acquire the internal lock on
io
here first also