Skip to content

Commit 6fbb9b7

Browse files
committed
Track loaded image size
1 parent 60273a5 commit 6fbb9b7

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/staticdata.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3277,6 +3277,7 @@ static void jl_restore_system_image_from_stream_(ios_t *f, jl_image_t *image, jl
32773277
arraylist_push(&jl_linkage_blobs, (void*)image_base);
32783278
arraylist_push(&jl_linkage_blobs, (void*)(image_base + sizeof_sysimg + sizeof(uintptr_t)));
32793279
arraylist_push(&jl_image_relocs, (void*)relocs_base);
3280+
jl_timing_counter_inc(JL_TIMING_COUNTER_ImageSize, sizeof_sysimg + sizeof(uintptr_t));
32803281
rebuild_image_blob_tree();
32813282

32823283
// jl_printf(JL_STDOUT, "%ld blobs to link against\n", jl_linkage_blobs.len >> 1);

src/timing.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ void jl_init_timing(void)
111111
TracyCPlotConfig(jl_timing_counters[JL_TIMING_COUNTER_JITSize].tracy_counter.name, TracyPlotFormatMemory, /* rectilinear */ 0, /* fill */ 1, /* color */ 0);
112112
TracyCPlotConfig(jl_timing_counters[JL_TIMING_COUNTER_JITCodeSize].tracy_counter.name, TracyPlotFormatMemory, /* rectilinear */ 0, /* fill */ 1, /* color */ 0);
113113
TracyCPlotConfig(jl_timing_counters[JL_TIMING_COUNTER_JITDataSize].tracy_counter.name, TracyPlotFormatMemory, /* rectilinear */ 0, /* fill */ 1, /* color */ 0);
114+
TracyCPlotConfig(jl_timing_counters[JL_TIMING_COUNTER_ImageSize].tracy_counter.name, TracyPlotFormatMemory, /* rectilinear */ 0, /* fill */ 1, /* color */ 0);
114115
#endif
115116
}
116117

src/timing.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ void jl_timing_puts(jl_timing_block_t *cur_block, const char *str);
197197
X(JITSize) \
198198
X(JITCodeSize) \
199199
X(JITDataSize) \
200+
X(ImageSize) \
200201

201202

202203
enum jl_timing_owners {

0 commit comments

Comments
 (0)