Skip to content

Commit

Permalink
rtutils: Add "quiet" type-printing for jl_static_show
Browse files Browse the repository at this point in the history
This is useful for Tracy, which can receive method signature strings
over the write. For performance reasons, we want to keep those strings
as small as possible, typically less than 80 characters long.

This change adds basic "configuration" support for `jl_static_show`,
including only a "quiet" parameter for now which can be used to avoid
printing DataType parameters.
  • Loading branch information
topolarity authored and pull[bot] committed Apr 27, 2023
1 parent 2886d29 commit 1892f72
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 70 deletions.
3 changes: 3 additions & 0 deletions src/julia_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,9 @@ void jl_gc_reset_alloc_count(void);
uint32_t jl_get_gs_ctr(void);
void jl_set_gs_ctr(uint32_t ctr);

typedef struct _jl_static_show_config_t { uint8_t quiet; } jl_static_show_config_t;
size_t jl_static_show_func_sig_(JL_STREAM *s, jl_value_t *type, jl_static_show_config_t ctx) JL_NOTSAFEPOINT;

STATIC_INLINE jl_value_t *undefref_check(jl_datatype_t *dt, jl_value_t *v) JL_NOTSAFEPOINT
{
if (dt->layout->first_ptr >= 0) {
Expand Down
Loading

0 comments on commit 1892f72

Please sign in to comment.