harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Yakushev" <andrey.yakus...@gmail.com>
Subject Re: [drlvm][jvmti] thread_java_basic.c::thread_end_count ---- is it necessary that this variable be accurate?
Date Wed, 28 Mar 2007 11:35:59 GMT
Similar problem was discussed here, see
http://mail-archives.apache.org/mod_mbox/harmony-dev/200701.mbox/%3c3c7e1c080701300217h200343f4ub8d2eba7e1388fdd@mail.gmail.com%3e.

As I remember, the decision was to have strict value instead of
approximation. So we have to synchronize alive_thread_count decrement
and other similar places as Weldon correctly noted.


Thanks,
Andrey


On 3/28/07, Gregory Shimansky <gshimansky@gmail.com> wrote:
> Weldon Washburn wrote:
> > Maybe I am misunderstanding the code.  It looks like
> > "alive_thread_count--;"
> > could be executed concurrently by multiple threads and consequently end up
> > with an incorrect value.  Is it OK to have an approximate value?
>
> This variable is not used by JVMTI code, JVMTI doesn't deal with
> statistics. The code was added at revision 513013 from HARMONY-2059 and
> is an implementation of j.l.management.ThreadMXBean native part.
>
> Since this is just statistics, I think it may have an approximate value.
>
> --
> Gregory
>
>

Mime
View raw message