Skip to content

Commit

Permalink
Export jl_debug_method_invalidation. (#35729)
Browse files Browse the repository at this point in the history
* Export jl_debug_method_invalidation.

* Don't write trailing null to stdout.
  • Loading branch information
vtjnash authored May 4, 2020
2 parents 9d175a0 + ffde1b2 commit 5ec0608
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -2285,7 +2285,7 @@ static void jl_insert_methods(jl_array_t *list)
}
}

extern int JL_DEBUG_METHOD_INVALIDATION;
extern int jl_debug_method_invalidation;

// verify that these edges intersect with the same methods as before
static void jl_verify_edges(jl_array_t *targets, jl_array_t **pvalids)
Expand Down Expand Up @@ -2377,7 +2377,7 @@ static void jl_insert_backedges(jl_array_t *list, jl_array_t *targets)
}
}
else {
if (JL_DEBUG_METHOD_INVALIDATION) {
if (jl_debug_method_invalidation) {
jl_static_show(JL_STDOUT, (jl_value_t*)caller);
jl_uv_puts(JL_STDOUT, "<<<\n", 4);
}
Expand Down
10 changes: 5 additions & 5 deletions src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1489,12 +1489,12 @@ static void update_max_args(jl_methtable_t *mt, jl_value_t *type)
mt->max_args = na;
}

int JL_DEBUG_METHOD_INVALIDATION = 0;
JL_DLLEXPORT int jl_debug_method_invalidation = 0;

// recursively invalidate cached methods that had an edge to a replaced method
static void invalidate_method_instance(jl_method_instance_t *replaced, size_t max_world, int depth)
{
if (JL_DEBUG_METHOD_INVALIDATION) {
if (jl_debug_method_invalidation) {
int d0 = depth;
while (d0-- > 0)
jl_uv_puts(JL_STDOUT, " ", 1);
Expand Down Expand Up @@ -1626,8 +1626,8 @@ static int invalidate_mt_cache(jl_typemap_entry_t *oldentry, void *closure0)
}
}
if (intersects) {
if (JL_DEBUG_METHOD_INVALIDATION) {
jl_uv_puts(JL_STDOUT, "-- ", 4);
if (jl_debug_method_invalidation) {
jl_uv_puts(JL_STDOUT, "-- ", 3);
jl_static_show(JL_STDOUT, (jl_value_t*)mi);
jl_uv_puts(JL_STDOUT, "\n", 1);
}
Expand Down Expand Up @@ -1776,7 +1776,7 @@ JL_DLLEXPORT void jl_method_table_insert(jl_methtable_t *mt, jl_method_t *method
}
}
}
if (invalidated && JL_DEBUG_METHOD_INVALIDATION) {
if (invalidated && jl_debug_method_invalidation) {
jl_uv_puts(JL_STDOUT, ">> ", 3);
jl_static_show(JL_STDOUT, (jl_value_t*)method);
jl_uv_puts(JL_STDOUT, " ", 1);
Expand Down

1 comment on commit 5ec0608

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(ALL, isdaily = true)

Please sign in to comment.