{ $description "Generates a cross-section profile at " { $snippet "depth" } " from the results of the most recent " { $link profile } ". Each sample's time will be charged to the function " { $snippet "depth" } " levels deep in the callstack, or to the deepest function in the callstack if the callstack at the time of the sample is fewer than " { $snippet "depth" } " levels deep. The output " { $snippet "tree" } " can be printed with the " { $link profile. } " word." } ;
{ $description "Generates a cross-section profile at " { $snippet "depth" } " from the profile results in " { $snippet "profile-data" } ". Each sample's time will be charged to the function " { $snippet "depth" } " levels deep in the callstack, or to the deepest function in the callstack if the callstack at the time of the sample is fewer than " { $snippet "depth" } " levels deep. The output " { $snippet "tree" } " can be printed with the " { $link profile. } " word." } ;
HELP:flat
{ $values
{ "flat""a profile report" }
}
{ $description "Generates a flat profile from the results of the most recent " { $link profile } ". Each sample's time will be charged to every function in the callstack at the time of the sample. The output " { $snippet "tree" } " can be printed with the " { $link profile. } " word." } ;
HELP:flat*
{ $values
{ "profile-data""raw profile data" }
{ "flat""a profile report" }
}
{ $description "Generates a flat profile from the profile results in " { $snippet "profile-data" } ". Each sample's time will be charged to every function in the callstack at the time of the sample. The output " { $snippet "tree" } " can be printed with the " { $link profile. } " word." } ;
HELP:foreign-sample-count
{ $values
{ "sample""a raw profile sample" }
{ "count"integer }
}
{ $description "Returns the number of sample intervals spent in non-Factor code (such as the Factor VM, or FFI calls) during " { $snippet "sample" } "." } ;
HELP:foreign-thread-sample-count
{ $values
{ "sample""a raw profile sample" }
{ "count"integer }
}
{ $description "Returns the number of sample intervals spent executing non-Factor threads within the Factor process during " { $snippet "sample" } "." } ;
HELP:foreign-thread-time
{ $values
{ "n" duration }
}
{ $description "Returns the total time spent executing non-Factor threads within the Factor process during the last " { $link profile } "." } ;
HELP:foreign-thread-time*
{ $values
{ "profile-data""raw profile data" }
{ "n" duration }
}
{ $description "Returns the total time spent executing non-Factor threads within the Factor process from the given " { $snippet "profile-data" } "." } ;
HELP:foreign-time
{ $values
{ "n" duration }
}
{ $description "Returns the total time spent in non-Factor code (such as the Factor VM, or FFI calls) during the last " { $link profile } "." } ;
HELP:foreign-time*
{ $values
{ "profile-data""raw profile data" }
{ "n" duration }
}
{ $description "Returns the total time spent in non-Factor code (such as the Factor VM, or FFI calls) from the given " { $snippet "profile-data" } "." } ;
HELP:gc-sample-count
{ $values
{ "sample""a raw profile sample" }
{ "count"integer }
}
{ $description "Returns the number of sample intervals spent in the garbage collector during " { $snippet "sample" } "." } ;
HELP:gc-time
{ $values
{ "n" duration }
}
{ $description "Returns the total time spent in the garbage collector during the last " { $link profile } "." } ;
HELP:gc-time*
{ $values
{ "profile-data""raw profile data" }
{ "n" duration }
}
{ $description "Returns the total time spent in the garbage collector from the given " { $snippet "profile-data" } "." } ;
HELP:jit-sample-count
{ $values
{ "sample""a raw profile sample" }
{ "count"integer }
}
{ $description "Returns the number of sample intervals spent in the non-optimizing compiler during " { $snippet "sample" } "." } ;
HELP:most-recent-profile-data
{ $values
{ "profile-data""raw profile data" }
}
{ $description "Returns the raw profile data from the most recent " { $link profile } ". This data can be saved and used with the " { $snippet "*" } " variants of reporting words, such as " { $link top-down* } " and " { $link flat* } ", independent of later executions of the profiler.." } ;
HELP:profile
{ $values
{ "quot" quotation }
}
{ $description "Executes " { $snippet "quot" } " with the sampling profiler enabled. The results of the profile can subsequently be reported with words such as " { $link top-down } " and " { $link flat } ", or the raw data can be saved and inspected with " { $link most-recent-profile-data } "." } ;
{ $class-description "Objects of this type are generated by profile reporting words such as " { $link top-down } ", " { $link top-down-max-depth } ", " { $link cross-section } ", and " { $link flat } "." } ;
{ $description "Generates a top-down tree profile from the results of the most recent " { $link profile } ". The output " { $snippet "tree" } " can be printed with the " { $link profile. } " word." } ;
HELP:top-down*
{ $values
{ "profile-data""raw profile data" }
{ "tree""a profile report" }
}
{ $description "Generates a top-down tree profile from the profile results in " { $snippet "profile-data" } ". The output " { $snippet "tree" } " can be printed with the " { $link profile. } " word." } ;
HELP:top-down-max-depth
{ $values
{ "max-depth"integer }
{ "tree""a profile report" }
}
{ $description "Generates a top-down tree profile from the results of the most recent " { $link profile } ". Functions at a callstack depth greater than " { $snippet "max-depth" } " will be filtered out. The output " { $snippet "tree" } " can be printed with the " { $link profile. } " word." } ;
{ $description "Generates a top-down tree profile from the profile results in " { $snippet "profile-data" } ". Functions at a callstack depth greater than " { $snippet "max-depth" } " will be filtered out. The output " { $snippet "tree" } " can be printed with the " { $link profile. } " word." } ;
HELP:total-sample-count
{ $values
{ "sample""a raw profile sample" }
{ "count"integer }
}
{ $description "Returns the total number of sample intervals spent during " { $snippet "sample" } "." } ;
HELP:total-time
{ $values
{ "n" duration }
}
{ $description "Returns the total time spent during the most recent " { $link profile } "." } ;
HELP:total-time*
{ $values
{ "profile-data""raw profile data" }
{ "n" duration }
}
{ $description "Returns the total time spent from the given " { $snippet "profile-data" } "." } ;
"The " { $vocab-link "tools.profiler.sampling" } " vocabulary provides an interface to Factor's sampling profiler. It provides words for running the profiler:"