REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
Loading...
Searching...
No Matches
real::detail::prof Namespace Reference

Opt-in route/work counters, compiled out unless the profiling build flag is set. More...

Enumerations

enum class  route : std::uint8_t {
  class_loop = 0 , cp_class_loop , exact_literal , inner_literal ,
  fixed_shape , fixed_shape_pair , codepoint_class , alternation ,
  aho_corasick , onepass_full , onepass_window , run_shape_window ,
  lazy_dfa_anchored , lazy_dfa_fwd_rev , general_full , general_window ,
  trailing_la , possessive_byte_loop , possessive_class_loop , possessive_cp_class_loop ,
  possessive_delimited , count_
}
 Named once-per-dispatch routes. Always visible so tick call sites compile OFF. More...
 
enum class  event : std::uint8_t {
  first_byte_skip = 0 , cascade , rare_byte , memmem ,
  wb_b1_drop , wb_b2_wrap , il_abandoned , pool_incref ,
  pool_decref , pool_cow_write , bounded_backtrack , count_
}
 Secondary events: prefilter work, word-boundary handling, abandons, capture-pool traffic. More...
 

Functions

constexpr void tick_route (route r) noexcept
 Bill one dispatch to route r. Erased entirely unless REAL_PROFILE is defined.
 
constexpr void tick_event (event e) noexcept
 Bill one occurrence of e. Erased entirely unless REAL_PROFILE is defined.
 
constexpr void tick_thread_count (std::size_t n) noexcept
 Bill one step() carrying n live threads. Erased entirely unless REAL_PROFILE is defined.
 
constexpr void tick_prefilter_candidate () noexcept
 Bill one candidate a prefilter produced. Erased entirely unless REAL_PROFILE is defined.
 
constexpr void tick_prefilter_rejected () noexcept
 Bill one prefilter candidate REJECTED by confirmation. See tick_prefilter_candidate for the scope these two share.
 

Detailed Description

Opt-in route/work counters, compiled out unless the profiling build flag is set.

Enumeration Type Documentation

◆ event

enum class real::detail::prof::event : std::uint8_t
strong

Secondary events: prefilter work, word-boundary handling, abandons, capture-pool traffic.

Enumerator
wb_b1_drop 

compile-time drop observed at first dispatch

wb_b2_wrap 

runtime wrap: class/cp loop with wb_lead|wb_trail

pool_incref 

COW capture-block refcount taken (one per split in the epsilon walk)

pool_decref 

COW capture-block refcount dropped (one per thread death)

pool_cow_write 

COW capture-block written (one per save, group 0 included)

bounded_backtrack 

the general loop answered by the bounded backtracker (small subject)

◆ route

enum class real::detail::prof::route : std::uint8_t
strong

Named once-per-dispatch routes. Always visible so tick call sites compile OFF.

Enumerator
fixed_shape_pair 

heterogeneous fixed shape, two-position vector prefilter.

aho_corasick 

multi-literal automaton, past the branch-count threshold.

run_shape_window 

Groups read by one greedy walk over the DFAs' window (pike_vm::match_run_shape).

lazy_dfa_anchored 

first-byte candidate + anchored_end

lazy_dfa_fwd_rev 

unanchored forward + reverse

possessive_byte_loop 

bare/suffixed possessive literal-byte +/++ (byte_loop_possessive).

possessive_class_loop 

bare/suffixed possessive class+/++ (klass_loop_possessive).

possessive_cp_class_loop 

bare/suffixed possessive cp-class +/++ (klass_cp_loop_possessive).

possessive_delimited 

literal-prefix + possessive loop + literal-suffix ("quoted").

Function Documentation

◆ tick_event()

constexpr void real::detail::prof::tick_event ( event  e)
constexprnoexcept

Bill one occurrence of e. Erased entirely unless REAL_PROFILE is defined.

Parameters
[in]eThe event to count.

◆ tick_prefilter_candidate()

constexpr void real::detail::prof::tick_prefilter_candidate ( )
constexprnoexcept

Bill one candidate a prefilter produced. Erased entirely unless REAL_PROFILE is defined.

counters::prefilter_candidates / counters::prefilter_rejected cover the inner-literal route's literal scan only: a candidate is one find_literal hit, a rejection one whose reverse walk reached no match start. Other routes are not folded in, so a zero says nothing about them.

◆ tick_route()

constexpr void real::detail::prof::tick_route ( route  r)
constexprnoexcept

Bill one dispatch to route r. Erased entirely unless REAL_PROFILE is defined.

Parameters
[in]rThe route that handled the search.

◆ tick_thread_count()

constexpr void real::detail::prof::tick_thread_count ( std::size_t  n)
constexprnoexcept

Bill one step() carrying n live threads. Erased entirely unless REAL_PROFILE is defined.

Parameters
[in]nThreads in the current list as the step begins.