harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yuri Kashnikoff" <yuri.kashnik...@gmail.com>
Subject Re: [drlvm][em] Value-profiling implementation is avaible.
Date Tue, 31 Oct 2006 15:54:29 GMT
2006/10/31, Mikhail Fursov <mike.fursov@gmail.com>:
> On 31 Oct 2006 17:23:30 +0600, Egor Pasko <egor.pasko@gmail.com> wrote:
> >
> >
> > The lock is not necessary if you update a single word. In case of
> > incrementing counters no synch is OK (minor inaccuracy), but here we
> > are updating an std::map, which is dangerous.
> >
> This is a problem! Even if we use map in read only mode we need
> synchronization because the global map could be modified from the separate
> thread in runtime when new profile is created.
> Yuri, can you use Method_Profile_Handle here and avoid access to the global
> map<Method,Profile> in addNewValue method?

Yes, I have done in addNewValue and thinking about getResult function.
I have also added using Method_Profile Handle in last patch.

For, Egor. Now I retabbed  this files in Vim and also switched from
tabs to spaces. I appreciated Your attentiveness. =)

View raw message