harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov" <mike.fur...@gmail.com>
Subject Re: [drlvm][em] Value-profiling implementation is avaible.
Date Tue, 31 Oct 2006 11:37:48 GMT
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?


-- 
Mikhail Fursov

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message