Skip to content
Permalink
Browse files

Prevent unnecessary gisting because of sinking

  • Loading branch information...
lizmat committed May 28, 2019
1 parent 26a309b commit 9203ef2e37ba671d064a8a6d8bcf97422cfe2a68
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/MoarVM/Profiler.pm6
@@ -386,6 +386,7 @@ class MoarVM::Profiler::Type does OnHash[<
self.bless(:%hash)
}
method TWEAK(--> Nil) {
# link to originating profile
%!hash.BIND-KEY("profile",$_) with $*PROFILE;
}

@@ -449,8 +450,8 @@ class MoarVM::Profiler::Thread does OnHash[<
self!mogrify-to-object(MoarVM::Profiler::Callee,'call_graph','caller');
self!mogrify-to-slip(MoarVM::Profiler::GC,'gcs','thread');

# link back to the profiler if one available
%!hash<profile> = $_ with $*PROFILE;
# link to originating profile
%!hash.BIND-KEY("profile",$_) with $*PROFILE;
}

# additional accessor logic
@@ -596,7 +597,7 @@ class MoarVM::Profiler {
}
method Str(--> Str:D) { self.gist }

method sink(--> Nil) { self.note }
method sink(--> Nil) { self.note if %!threads_by_id }

multi method profile(&code, :$times!) {
my @profiles;

0 comments on commit 9203ef2

Please sign in to comment.
You can’t perform that action at this time.