-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
Description
vscode now has a built in heapsnapshot viewer that seems more powerful than the chrome devtools one.
Unfortunately julia-generated heapsnapshot files do not open and report Error: invalid profile JSON, whilst they open in devtools.
File sizes:
- from a chrome webpage: 5 MB (renders instantly)
- from a fresh julia session: 175 MB (hangs indefinitely and reports
Error: invalid profile JSON)
2023-12-30 19:27:38.621 [info] ExtensionService#_doActivateExtension ms-vscode.vscode-js-profile-table, startup: false, activationEvent: 'onCustomEditor:jsProfileVisualizer.heapsnapshot.table'
2023-12-30 19:27:38.772 [error] UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "invalid profile JSON".
Asked upstream at microsoft/vscode#199239 (comment) with a file attached.
Both files validate in jsonlint.com
Headers:
julia's
{
"snapshot": {
"meta": {
"node_fields": [
"type",
"name",
"id",
"self_size",
"edge_count",
"trace_node_id",
"detachedness"
],
"node_types": [
[
"synthetic",
"jl_task_t",
"jl_module_t",
"jl_array_t",
"object",
"jl_datatype_t",
"String",
"jl_sym_t",
"jl_svec_t"
],
"string",
"number",
"number",
"number",
"number",
"number"
],
"edge_fields": [
"type",
"name_or_index",
"to_node"
],
"edge_types": [
[
"internal",
"element",
"hidden",
"property"
],
"string_or_number",
"from_node"
]
},
"node_count": 911769,
"edge_count": 3024013
},
Chrome's
{
"snapshot": {
"meta": {
"node_fields": [
"type",
"name",
"id",
"self_size",
"edge_count",
"trace_node_id",
"detachedness"
],
"node_types": [
[
"hidden",
"array",
"string",
"object",
"code",
"closure",
"regexp",
"number",
"native",
"synthetic",
"concatenated string",
"sliced string",
"symbol",
"bigint",
"object shape"
],
"string",
"number",
"number",
"number",
"number",
"number"
],
"edge_fields": [
"type",
"name_or_index",
"to_node"
],
"edge_types": [
[
"context",
"element",
"property",
"internal",
"hidden",
"shortcut",
"weak"
],
"string_or_number",
"node"
],
"trace_function_info_fields": [
"function_id",
"name",
"script_name",
"script_id",
"line",
"column"
],
"trace_node_fields": [
"id",
"function_info_index",
"count",
"size",
"children"
],
"sample_fields": [
"timestamp_us",
"last_assigned_id"
],
"location_fields": [
"object_index",
"script_id",
"line",
"column"
]
},
"node_count": 58856,
"edge_count": 245569,
"trace_function_count": 0
},
cc. @NHDaly