comparison src/share/vm/services/memPtr.hpp @ 10986:1f4355cee9a2

8013651: NMT: reserve/release sequence id's in incorrect order due to race Summary: Fixed NMT race condition for realloc, uncommit and release Reviewed-by: coleenp, ccheung
author zgu
date Tue, 18 Jun 2013 08:44:08 -0400
parents b80cc96882f7
children
comparison
equal deleted inserted replaced
10984:cd2118b62475 10986:1f4355cee9a2
1 /* 1 /*
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
455 jint _seq; // sequence number 455 jint _seq; // sequence number
456 456
457 public: 457 public:
458 SeqMemPointerRecord(): _seq(0){ } 458 SeqMemPointerRecord(): _seq(0){ }
459 459
460 SeqMemPointerRecord(address addr, MEMFLAGS flags, size_t size) 460 SeqMemPointerRecord(address addr, MEMFLAGS flags, size_t size, jint seq)
461 : MemPointerRecord(addr, flags, size) { 461 : MemPointerRecord(addr, flags, size), _seq(seq) {
462 _seq = SequenceGenerator::next();
463 } 462 }
464 463
465 SeqMemPointerRecord(const SeqMemPointerRecord& copy_from) 464 SeqMemPointerRecord(const SeqMemPointerRecord& copy_from)
466 : MemPointerRecord(copy_from) { 465 : MemPointerRecord(copy_from) {
467 _seq = copy_from.seq(); 466 _seq = copy_from.seq();
486 485
487 public: 486 public:
488 SeqMemPointerRecordEx(): _seq(0) { } 487 SeqMemPointerRecordEx(): _seq(0) { }
489 488
490 SeqMemPointerRecordEx(address addr, MEMFLAGS flags, size_t size, 489 SeqMemPointerRecordEx(address addr, MEMFLAGS flags, size_t size,
491 address pc): MemPointerRecordEx(addr, flags, size, pc) { 490 jint seq, address pc):
492 _seq = SequenceGenerator::next(); 491 MemPointerRecordEx(addr, flags, size, pc), _seq(seq) {
493 } 492 }
494 493
495 SeqMemPointerRecordEx(const SeqMemPointerRecordEx& copy_from) 494 SeqMemPointerRecordEx(const SeqMemPointerRecordEx& copy_from)
496 : MemPointerRecordEx(copy_from) { 495 : MemPointerRecordEx(copy_from) {
497 _seq = copy_from.seq(); 496 _seq = copy_from.seq();