This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dwarflint --stats


17.09.2010 18:32, Petr Machata wrote:
>> Another variant would be to also tally what portion of available locations
>> is mutable vs immutable (or distribution of the ratios, or whatever).  That
>> is, DW_AT_const_value is immutable.  A location expression is immutable if
>> it ends in DW_OP_implicit_value or DW_OP_stack_value.  If an expression
>> uses DW_OP_{,bit_}piece, then it can be partially mutable and partially
>> immutable.  You can probably just choose arbitrarily to count those on one
>> side or the other, or perhaps tally them as a separate third statistic.
>
> That's not yet there.

I didn't write about it, but it's been there for some time now.  It's 
now possible to ignore DIEs that are "mutable" or "immutable". 
Mutability is determined depending on whether the expression contains 
DW_OP_{implicit|stack}_value before DW_OP_{,bit}_piece.  If it does, 
it's mutable, otherwise it's immutable.

Since there can be multiple pieces per expression, one DIE may end up 
being classified as both mutable and immutable.  There's no flag for 
"ignore not immutable".  These stats can be computed in a roundabout way 
by first running dwarflint with no ignore, then with ignore immutable 
and subtracting.  If that's something that is useful, I can teach the 
appropriate class to be able to ignore !mutable, or something like that.

And now it occurs to me that it needs to handle DW_OP_call to determine 
the mutability accurately, which is not currently done.

PM

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]