|
From: Julian S. <js...@ac...> - 2007-08-28 11:33:49
|
On Tuesday 28 August 2007 12:18, Nicholas Nethercote wrote:
> On Tue, 28 Aug 2007, Oswald Buddenhagen wrote:
> >> Author: sewardj
> >> +static Bool is_helperc_value_checkN_fail ( HChar* name )
> >> +{
> >> + return
> >> + 0==VG_(strcmp)(name, "MC_(helperc_value_check0_fail)")
> >> + || 0==VG_(strcmp)(name, "MC_(helperc_value_check1_fail)")
> >> + || 0==VG_(strcmp)(name, "MC_(helperc_value_check4_fail)")
> >> + || 0==VG_(strcmp)(name, "MC_(helperc_value_check8_fail)");
> >> +}
> >
> > this looks incredibly slow to me, at least when partial matches are
> > expected to occur from time to time. how about using the address of a
> > globally stored instance of each string as a key? or just the address of
> > the function itself?
>
> But it's not called very often.
Indeed, on an OProfile'd run of memcheck starting konqueror, I cannot
see this on the profile at all. Not only is it not called very often,
it tends to pay for itself fairly quickly by improving the quality of the
code emitted by the JIT.
J
|