Review Request: 6896043: Zero fixes

Gary Benson gbenson at redhat.com
Tue Nov 24 02:27:04 PST 2009


Vladimir Kozlov wrote:
> Gary Benson wrote:
> > Vladimir Kozlov wrote:
> > > hotspot/src/share/vm/runtime/os.hpp:
> > > Can you explain why your changes is not the same as the comment
> > > says?: ((_mem_serialize_page ^ addr) & -pagesize) == 0
> >
> > Basically because I didn't know if I'd need to make changes
> > anywhere else, and I didn't want to break the other platforms.
> > Should I change it to what the comment says?
>
> I am concern about correctness of your code - page sizes could be
> different.  I would prefer if your code will be similar to one in
> is_poll_address().

So something like this:

  static bool    is_memory_serialize_page(JavaThread *thread, address addr) {
    if (UseMembar) return false;
    if (thread == NULL) return false;
    return addr >= _mem_serialize_page && addr < (_mem_serialize_page + os::vm_page_size());
  }

The "if (thread == NULL) return false;" would no longer be necessary,
so it could either be retained to preserve the old behaviour or not.
Which would you prefer?

Cheers,
Gary

-- 
http://gbenson.net/


More information about the hotspot-compiler-dev mailing list