Skip to content
Permalink
Browse files

Point to the documentation in the nqp repo

  • Loading branch information...
lizmat committed May 28, 2019
1 parent 7b10a42 commit a32ad594fd2ead0605860018bd298b17a84dcc9a
Showing with 5 additions and 61 deletions.
  1. +5 βˆ’61 lib/MoarVM/Profiler.pm6
@@ -2,67 +2,11 @@
# nqp::mvmendprofile, when started with mvmstartprofile({:instrumented})

# The nqp::mvmendprofile returns an nqp::list that needs to be nqp::hllize'd
# before you can iterate over it in Perl 6.

# The first element is an array of arrays with information about the types
# that have been allocated. At the moment of writing, this array appears to
# have information about objects that were created, but for which there is no
# allocation information. It has the following structure:

# 0 - array with type information
# β”œ 0 = 140415871842064 - unique ID for this type
# β”” 1 - hash with additional information
# β”œ repr => P6opaque - name of the REPR of this type
# β”œ type => Block - type object of type (aka, the .WHAT)
# β”œ managed_size => 72 - size in bytes of instance
# β”” has_unmanaged_data => 1 - is there additional data on heap?

# The second element of the list returned by nqp::mvmendprofile, is a list of
# hashes, one for each thread on which data has been collected. It has the
# following structure (times are in microseconds, sizes are in bytes):
#
# 0 - hash with info of thread
# β”œ thread => 1 - OS thread ID
# β”œ parent => 0 - OS thread ID of parent thread
# β”œ spesh_time => 0 - amount of time spent in spesh
# β”œ start_time => 0 - when thread was started
# β”” total_time => 21004 - total time spent in thread
# β”œ call_graph - hash with first Callee info
# β”‚ β”œ id => 140328666076608 - unique ID of this Callee
# β”‚ β”œ first_entry_time => 0 - when Callee was first called
# β”‚ β”œ inclusive_time => 2 - time spent here + all sub-Callees
# β”‚ β”œ exclusive_time => 2 - time spent in this Callee
# β”‚ β”œ entries => 97897 - number of times Callee was called
# β”‚ β”œ inlined_entries => 56757 - times called when inlined
# β”‚ β”œ jit_entries => 6566 - times called when jitted
# β”‚ β”œ osr => 1 - times Callee was OSR'd
# β”‚ β”œ name => foo - name of Callee (if available)
# β”‚ β”œ file => gen/moar/BOOTSTRAP.nqp - filename of Callee
# β”‚ β”œ line => 2070 - line of Callee in file
# β”‚ β”œ allocations => (2) - array with Allocations
# β”‚ β”‚ β”œ 0 - hash with Allocation info
# β”‚ β”‚ β”‚ β”œ count => 100 - number of allocations
# β”‚ β”‚ β”‚ β”œ replaced => 1 - scalar replacements stopping alloc
# β”‚ β”‚ β”‚ β”” id => 140329083232016 - type ID
# β”‚ β”” callees => (2) - array with Callees called here
# β”” gcs - array with Garbage Collections
# β”” 0 - hash with GC info
# β”œ sequence => 0 - ordinal number of GC
# β”œ start_time => 1964 - when GC was started
# β”œ time => 7222 - time spent doing GC
# β”œ full => 0 - whether or not a full GC
# β”œ responsible => 1 - thread ID that triggered this GC
# β”œ promoted_bytes => 212960 - bytes promoted from the nuresery
# β”œ promoted_bytes_unmanaged => 54781 - additional bytes promoted
# β”œ retained_bytes => 76576 - bytes *not* promoted
# β”œ cleared_bytes => 3228716 - bytes cleared from the nursery
# β”œ gen2 => 18402 -
# β”œ gen2_roots => 18402 - gen2 allocs rooted in nursery
# β”œ deallocs - array with Deallocations
# β”œ 0 - hash with deallocation info
# β”œ id => 140329080607960 - type ID being deallocated
# β”œ nursery_seen => 10 - seen before in a GC
# β”” nursery_fresh => 6 - *not* seen before in a GC
# before you can iterate over it in Perl 6. The documentation of this
# structure can be found in the nqp repository, docs/ops.markdown (or on
# github at:
#
# https://github.com/perl6/nqp/blob/master/docs/ops.markdown#mvmendprofile

# To reduce any additional memory pressure, the objects created by this class
# are just shims around the arrays / hashes that have been returned. This

0 comments on commit a32ad59

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