• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

4.42.1 library(prolog_profile): Execution profiler
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Execution profiling
          • library(prolog_profile): Execution profiler
            • profile/1
            • profile/2
            • show_profile/1
            • profile_data/1
            • profile_procedure_data/2
    • Packages
Availability::- use_module(library(prolog_profile)).(can be autoloaded)
Source[det]profile_data(-Data)
Gather all relevant data from profiler. This predicate may be called while profiling is active in which case it is suspended while collecting the data. Data is a dict providing the following fields:
summary:Dict
Overall statistics providing

  • samples:Count: Times the statistical profiler was called or, if exact is true, the number of times execution moved to another node of the call tree.
  • ticks:Count Nanoseconds sampled during profiling
  • accounting:Count Nanoseconds spent on accounting. This is the profiler's own overhead. The exact modes measure it and exclude it from the times of the predicates.
  • time:Seconds Total time sampled
  • nodes:Count Nodes in the call graph.
  • sample_period: MicroSeconds Same interval timer period in micro seconds
  • ports: Ports One of true, false or classic
  • clock: Clock One of cpu or wall, the time that was profiled.
  • exact: Bool Whether the data was collected using exact(true)
  • allocated: Bytes
  • discarded: Bytes
  • gc_reclaimed: Bytes Global stack allocated, discarded by backtracking and reclaimed by garbage collection while profiling.
  • gc_count: Count Number of garbage collections while profiling.
nodes
List of nodes. Each node provides:
predicate:PredicateIndicator
or a blob that represents another profiled object, such as an XPCE method.
ticks_self:Count
ticks_siblings:Count
Nanoseconds sampled in the predicate itself and in its callees.
alloc_self:Bytes
alloc_siblings:Bytes
Global stack allocated by the predicate itself and by its callees.
discarded_self:Bytes
discarded_siblings:Bytes
Global stack discarded by backtracking into a choicepoint of the predicate itself and of its callees.
call:Count
redo:Count
exit:Count
callers:list_of(Relative)
callees:list_of(Relative)

Relative is a term of the shape below that represents a caller or callee. Future versions are likely to use a dict instead.

node(PredicateIndicator, CycleID, Ticks, TicksSiblings,
     Calls, Redos, Exits, Memory)

Memory is a term mem(Alloc, AllocSiblings, Discarded, DiscardedSiblings), the global stack in bytes allocated and discarded by these calls, by the called predicate itself and by its callees, as the ‘alloc_* and discarded_*` keys of the node.

ClioPatria (version V3.1.1-51-ga0b30a5)