[antlr-interest] c++ antlr profiling question

Brian Smith brianlsmith at gmail.com
Tue Jun 14 14:53:25 PDT 2005


Those look like internal exception handling functions from GCC to me.
Perhaps you have some predicates that cause backtracking very often? I
believe that backtracking is implemented via ANTLR 2.x via exceptions,
and exceptions handling in GCC is designed to be fast when exceptions
_are not_ thrown, at the expense of being very expensive when they
_are_ through.

- Brian

On 6/14/05, Bryan Ewbank <ewbank at gmail.com> wrote:
> Hi Folks,
> 
> We've been collecting some performance numbers, and I need help
> understanding them in the context of antlr.
> 
> Any idea what these functions are (linux g++ compiler):
> 
>       %       function name
>     -----    ------------------------------
>     19.50    read_encoded_value_with_base(u
>     18.74    read_uleb128(unsigned char con
>      9.85    __gxx_personality_v0
>      6.75    base_of_encoded_value(unsigned
>      4.23    execute_cfa_program
>      4.03    _Unwind_IteratePhdrCallback
> 
> Any information, especially on read_encoded_value_with_base, would be
> great.  I see a few hits on the web, but nothing substantial.  Having
> 20% of our execution time go into something that we don't grok
> concerns me a bit ;-)
>


More information about the antlr-interest mailing list