8013651: NMT: reserve/release sequence id's in incorrect order due to race

Fixed NMT race condition for realloc, uncommit and release

Reviewed-by: coleenp, ccheung
This commit is contained in:
Zhengyu Gu 2013-06-18 08:44:08 -04:00
parent 87505d60f6
commit 61a30f035b
14 changed files with 464 additions and 252 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -220,7 +220,7 @@ class MemRecorder : public CHeapObj<mtNMT|otNMTRecorder> {
~MemRecorder();
// record a memory operation
bool record(address addr, MEMFLAGS flags, size_t size, address caller_pc = 0);
bool record(address addr, MEMFLAGS flags, size_t size, jint seq, address caller_pc = 0);
// linked list support
inline void set_next(MemRecorder* rec) {