profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/vilterp/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

ravichugh/sketch-n-sketch 512

Direct Manipulation Programming for HTML/SVG

vilterp/datalog-ts 82

a datalog interpreter in typescript

vilterp/classdepgraph 5

Python script to scrape UChicago's course catalog & visualize course prerequisites with Graphviz

vilterp/braindump 3

semantic wiki

rozap/transform 2

quick and dirty prototype

vilterp/bjscav-item214 2

the hydrater™

courageousillumination/recomendr 1

Recomendr recommends classes for you to take (scav 2014)

imeckler/intSched 1

Interactive scheduler 2.0

push eventvilterp/julia

Pete Vilter

commit sha e40076212bf4fa19c60acf9e058e546e6172e1eb

attempt to add subroots node and edges

view details

push time in 17 hours

push eventvilterp/julia

Pete Vilter

commit sha d78510a8d08f9e67e25f30da3f2d8cc0884c7493

function to add edges from uber root to roots

view details

Pete Vilter

commit sha ebe5311848caffa86ef3abc82eabed05f6b74652

add uber root and gc roots object

view details

push time in 17 hours

pull request commentJuliaLang/julia

Heap snapshot

@jpsamaroo the snapshots are written as JSON (we'll write some notes about the format; had to reverse-engineer it); so a separate Julia package could parse and render them somehow. cc @NHDaly

vilterp

comment created time in 18 hours

push eventvilterp/julia

Pete Vilter

commit sha fbc740f0de05baebc577042cbabbba546f7cab16

add gc annotations

view details

Valentin Churavy

commit sha 6808d3fc9a01c640aeaf446efb8333d5ead3aa82

add gc-heap-snapshot.h to gc.o dependency list

view details

Valentin Churavy

commit sha 8422b781e0c1999dc98b9b3408108f6646f9a629

[GCHEAP] add JL_NOTSAFEPOINT

view details

Nathan Daly

commit sha 1ba47ab6bdf6c75e5b9374b72898f7297a1de510

Disable GC Snapshotting w/ inline check for performance Ensure that the check for GC Heap Snapshot enabled is done in inline functions so that it will be performed in the original code unit, and avoid a jump if disabled.

view details

Nathan Daly

commit sha a108bbeca3cde4e3d3a0a08e66c6409c2638db76

mark the gc_heap_snapshot_enabled check __unlikely

view details

Nathan Daly

commit sha 96321d528c91cc2e178ceae962c1f8d7e9931437

fix annotations on new inline funcs

view details

Pete Vilter

commit sha 6156cde0e3661c030a4605c7fb1c495cfd263a5a

revert to just type name because we can't safely print full types, because they GC

view details

Pete Vilter

commit sha 8d6961a758ff12dd88139e21aefc32531dac7d50

Merge branch 'pv-heap-snapshot-revert-to-typename' into pv-heap-snapshot

view details

Pete Vilter

commit sha 1eda121c095520c330825b4944ddbb28f1601704

start adding roots

view details

push time in 19 hours

push eventvilterp/julia

Pete Vilter

commit sha 6156cde0e3661c030a4605c7fb1c495cfd263a5a

revert to just type name because we can't safely print full types, because they GC

view details

Pete Vilter

commit sha 8d6961a758ff12dd88139e21aefc32531dac7d50

Merge branch 'pv-heap-snapshot-revert-to-typename' into pv-heap-snapshot

view details

push time in 19 hours

create barnchvilterp/julia

branch : pv-heap-snapshot-roots

created branch time in 20 hours

push eventvilterp/julia

Pete Vilter

commit sha fbc740f0de05baebc577042cbabbba546f7cab16

add gc annotations

view details

push time in 20 hours

pull request commentJuliaLang/julia

Heap snapshot

Would be interesting to think about how this relates to https://github.com/JuliaLang/julia/pull/31534 and its continuation, https://github.com/JuliaLang/julia/pull/33467

vilterp

comment created time in a day

push eventvilterp/julia

Pete Vilter

commit sha a2beb2e131c6d674a782eda0f726300a1d8ef5f7

string and symbol sizes

view details

push time in 2 days

push eventvilterp/julia

Pete Vilter

commit sha cc021c51a1e109028aaa7ccbecca64a074aa6c92

capture string and symbol values; tag them for viewer

view details

push time in 2 days

push eventvilterp/julia

Pete Vilter

commit sha 2d25439541f3c83df34c7005418e9cb6b996378f

rename _record_gc_node => _record_gc_edge

view details

push time in 2 days

MemberEvent

push eventvilterp/julia

Pete Vilter

commit sha b6f863ca9861f3c574d3c5acd8aa454325744815

don't write out empty arrays which confuse chrome

view details

Pete Vilter

commit sha a3fdf7b34bbcf8ae2c10ab17594437dba63a513c

Merge remote-tracking branch 'vilterp/pv-heap-snapshot' into pv-heap-snapshot

view details

push time in 6 days

Pull request review commentJuliaLang/julia

Heap snapshot

+#include "gc-heap-snapshot.h"++#include <vector>+#include <string>+#include <unordered_map>+#include <unordered_set>++using std::vector;+using std::string;+using std::unordered_map;+using std::unordered_set;++struct HeapSnapshot;+void serialize_heap_snapshot(JL_STREAM *stream, HeapSnapshot &snapshot);++// Dump format:+// Nodes+// "node_fields":+//   [ "type", "name", "id", "self_size", "edge_count", "trace_node_id", "detachedness" ]++struct Node {+    string type;+    string name;+    size_t id;+    size_t self_size;+    int edge_count;+    size_t trace_node_id;+    // whether the node is attached or dettached from the main application state+    // TODO: .... meaning not yet understood.+    // https://github.com/nodejs/node/blob/5fd7a72e1c4fbaf37d3723c4c81dce35c149dc84/deps/v8/include/v8-profiler.h#L739-L745+    int detachedness;  // 0 - unknown,  1 - attached;  2 - detached+};++// Edges+// "edge_fields":+//   [ "type", "name_or_index", "to_node" ]++struct Edge {+    string type;+    size_t name_or_index; // essentially 'from'+    size_t to_node;+};++//template<typename K, typename V>+//auto find_or_insert_iter(unordered_map<K,V>& map, const K &key) {+//}++struct StringTable {+    typedef unordered_map<string, size_t> MapType;++    MapType map;+    vector<string> strings;++    StringTable() {}+    StringTable(std::initializer_list<string> strs) : strings(strs) {+        for (const auto& str : strs) {+            map.insert({str, map.size()});+        }+    }++    size_t find_or_create_string_id(string key) {+        auto val = map.find(key);+        if (val == map.end()) {+            val = map.insert(val, {key, map.size()});+            strings.push_back(key);+        }+        return val->second;+    }++    void print_json_array(JL_STREAM *stream, bool newlines) {+        jl_printf(stream, "[");+        bool first = true;+        for (const auto &str : strings) {+            if (first) {+                first = false;+            } else {+                jl_printf(stream, ",");+                if (newlines) {+                    jl_printf(stream, "\n");+                }+            }+            jl_printf(stream, "\"%s\"", str.c_str());+        }+        jl_printf(stream, "]");+    }+};++struct HeapSnapshot {+public:++// private:+    vector<Node> nodes;++    vector<Edge> edges;++    StringTable names;+    StringTable node_types = {"object"};+    StringTable edge_types = {"property"};+    unordered_set<size_t> seen_node_ids;+};+++// TODO: Do we need to refer to nodes by their index in the node array?+//size_t find_or_create_node_id(HeapSnapshot& snapshot, string key) {+//    return find_or_insert_iter(snapshot.nodes_map, key)->second;+//}++HeapSnapshot *g_snapshot = nullptr;++JL_DLLEXPORT void jl_gc_take_heap_snapshot(JL_STREAM *stream) {+    // Enable snapshotting+    g_snapshot = new HeapSnapshot();++    // Do GC, which will callback into record_edge_to_gc_snapshot()...+    jl_gc_collect(JL_GC_FULL);++    // When we return, the snapshot is full+    // Dump the snapshot+    serialize_heap_snapshot(stream, *g_snapshot);+    +    // Disable snapshotting+    g_snapshot = nullptr;

does this actually free the snapshot (and everything inside it?) just want to make sure we're not leaking all that

vilterp

comment created time in 6 days

PullRequestReviewEvent

push eventvilterp/julia

Pete Vilter

commit sha d41b61880356b84d7ac517d1162159486f2e6321

add Julia wrapper function GC.take_heap_snapshot

view details

Pete Vilter

commit sha e49be9bc6de7638b40ad5c33cf55078be4c89ecb

can't use IOStream here

view details

Pete Vilter

commit sha 9a2f113237b479a6c38bfae7899bb8718f7545a5

add doc comment

view details

Pete Vilter

commit sha 5379aaddcd48c9f00bf18e36a4b00eb54730bd12

Merge remote-tracking branch 'vilterp/pv-heap-snapshot' into pv-heap-snapshot

view details

Pete Vilter

commit sha 7eebc29df659323f8d2df0f3da51d77939f7bb91

update hardcoded string tables

view details

Pete Vilter

commit sha b188cc9500b9b817cc387e635317f5b05be97659

Merge remote-tracking branch 'vilterp/pv-heap-snapshot' into pv-heap-snapshot

view details

push time in 6 days

push eventvilterp/julia

Pete Vilter

commit sha e49be9bc6de7638b40ad5c33cf55078be4c89ecb

can't use IOStream here

view details

Pete Vilter

commit sha e1b8e0e0aa3c228e60026a6f09ad8baae90a1294

try getting type name

view details

push time in 6 days

push eventvilterp/julia

Pete Vilter

commit sha e49be9bc6de7638b40ad5c33cf55078be4c89ecb

can't use IOStream here

view details

push time in 6 days

push eventvilterp/julia

Pete Vilter

commit sha 0dfff67101da80609e8dd87e9da7ebe149bd010c

try getting type name

view details

push time in 6 days

create barnchvilterp/julia

branch : pv-heap-snapshot-typename

created branch time in 6 days

create barnchvilterp/julia

branch : pv-heap-snapshot-interface

created branch time in 6 days

push eventvilterp/julia

Pete Vilter

commit sha 27827f830a3b6be79222be15ef7a1893c6bda92b

rename to take_heap_snapshot

view details

push time in 6 days

PR opened JuliaLang/julia

Heap snapshot

The intention is to expose a function take_heap_snapshot(stream), which writes a heap snapshot in Chrome's .heapsnapshot JSON format to the given IO stream.

Usage (for now)

@ccall take_gc_snapshot(stderr.handle::Ptr{Cvoid})::Cvoid # this turns it on
GC.gc() # TODO: call this from inside take_gc_snapshot
func_io = open("jl_heap_dump.json", "w")
@ccall take_gc_snapshot(stderr.handle::Ptr{Cvoid})::Cvoid
close(func_io)

Problems:

  • [ ] not sure if edges are accurate
  • [ ] seems to hang when loading into Chrome viewer
  • [ ] not capturing types of nodes
+279 -10

0 comment

5 changed files

pr created time in 7 days

push eventvilterp/julia

Pete Vilter

commit sha d9db09a7fba325d279a676eb4797eaad1c1706b8

direct output to a stream

view details

Pete Vilter

commit sha d14bd89356048929cc48d83e8f8c4071b162603e

Merge remote-tracking branch 'vilterp/pv-heap-snapshot' into pv-heap-snapshot

view details

push time in 7 days

push eventvilterp/julia

Pete Vilter

commit sha 05c3261c05f8d65a77632ff97ff008b29c572dca

fill out metadata header

view details

Pete Vilter

commit sha 23ab6325a1beda20342841f45877c7e974265e7f

factor out string table

view details

Pete Vilter

commit sha 75aa2b41b79a9a6ff5a383fdddbb6651f3eb623f

Remove stderr println in record_edge

view details

Pete Vilter

commit sha db2361dd88e7da9af7768a023395cffc086cfd1e

Merge remote-tracking branch 'vilterp/pv-heap-snapshot' into pv-heap-snapshot

view details

Pete Vilter

commit sha f2fe2cf9a491fa408e3361c754e1ff96c11a6864

add todos

view details

push time in 7 days

push eventvilterp/julia

Pete Vilter

commit sha 62a24f8614a26fbdbb9f1e749c6ec8d346e71c1b

add nodes; print addresses correctly

view details

push time in 7 days

push eventvilterp/julia

Pete Vilter

commit sha dfd5b83b736195a0a086a26140e247357be80848

fix commas

view details

push time in 7 days

push eventvilterp/julia

Pete Vilter

commit sha a5b6a4f65d53adf5e45e727448d879406070490e

it builds!

view details

push time in 7 days

push eventvilterp/julia

Pete Vilter

commit sha 7fbd6766cab1d8d2a91797f9bc7d03113874cf8a

set up global heap snapshot and serializer function

view details

push time in 7 days

MemberEvent