@@ -1195,7 +1195,7 @@ static NOINLINE jl_taggedvalue_t *add_page(jl_gc_pool_t *p) JL_NOTSAFEPOINT
1195
1195
}
1196
1196
1197
1197
// Size includes the tag and the tag is not cleared!!
1198
- JL_DLLEXPORT jl_value_t * jl_gc_pool_alloc_inner (jl_ptls_t ptls , int pool_offset ,
1198
+ static inline jl_value_t * jl_gc_pool_alloc_inner (jl_ptls_t ptls , int pool_offset ,
1199
1199
int osize )
1200
1200
{
1201
1201
// Use the pool offset instead of the pool address as the argument
@@ -1264,7 +1264,7 @@ JL_DLLEXPORT jl_value_t *jl_gc_pool_alloc(jl_ptls_t ptls, int pool_offset,
1264
1264
// This wrapper exists only to prevent `jl_gc_pool_alloc_inner` from being inlined into
1265
1265
// its callers. We provide an external-facing interface for callers, and inline `jl_gc_pool_alloc_inner`
1266
1266
// into this. (See https://github.com/JuliaLang/julia/pull/43868 for more details.)
1267
- jl_value_t * jl_gc_pool_alloc_wrapper (jl_ptls_t ptls , int pool_offset , int osize ) {
1267
+ jl_value_t * jl_gc_pool_alloc_noinline (jl_ptls_t ptls , int pool_offset , int osize ) {
1268
1268
return jl_gc_pool_alloc_inner (ptls , pool_offset , osize );
1269
1269
}
1270
1270
@@ -3522,6 +3522,8 @@ JL_DLLEXPORT void *jl_gc_managed_malloc(size_t sz)
3522
3522
SetLastError (last_error );
3523
3523
#endif
3524
3524
errno = last_errno ;
3525
+ // jl_gc_managed_malloc is currently always used for allocating array buffers.
3526
+ maybe_record_alloc_to_profile (b , sz , (jl_datatype_t * )jl_buff_tag );
3525
3527
return b ;
3526
3528
}
3527
3529
@@ -3563,7 +3565,7 @@ static void *gc_managed_realloc_(jl_ptls_t ptls, void *d, size_t sz, size_t olds
3563
3565
SetLastError (last_error );
3564
3566
#endif
3565
3567
errno = last_errno ;
3566
-
3568
+ maybe_record_alloc_to_profile ( b , sz , jl_gc_unknown_type_tag );
3567
3569
return b ;
3568
3570
}
3569
3571
0 commit comments