src/share/vm/services/memPtr.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/services

src/share/vm/services/memPtr.hpp

Print this page


   1 /*
   2  * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 440     VMMemRegion::operator=(other);
 441     _pc = other.pc();
 442     return *this;
 443   }
 444 
 445   inline address pc() const { return _pc; }
 446  private:
 447   address   _pc;
 448 };
 449 
 450 /*
 451  * Sequenced memory record
 452  */
 453 class SeqMemPointerRecord : public MemPointerRecord {
 454  private:
 455    jint _seq;  // sequence number
 456 
 457  public:
 458   SeqMemPointerRecord(): _seq(0){ }
 459 
 460   SeqMemPointerRecord(address addr, MEMFLAGS flags, size_t size)
 461     : MemPointerRecord(addr, flags, size) {
 462     _seq = SequenceGenerator::next();
 463   }
 464 
 465   SeqMemPointerRecord(const SeqMemPointerRecord& copy_from)
 466     : MemPointerRecord(copy_from) {
 467     _seq = copy_from.seq();
 468   }
 469 
 470   SeqMemPointerRecord& operator= (const SeqMemPointerRecord& ptr) {
 471     MemPointerRecord::operator=(ptr);
 472     _seq = ptr.seq();
 473     return *this;
 474   }
 475 
 476   inline jint seq() const {
 477     return _seq;
 478   }
 479 };
 480 
 481 
 482 
 483 class SeqMemPointerRecordEx : public MemPointerRecordEx {
 484  private:
 485   jint    _seq;  // sequence number
 486 
 487  public:
 488   SeqMemPointerRecordEx(): _seq(0) { }
 489 
 490   SeqMemPointerRecordEx(address addr, MEMFLAGS flags, size_t size,
 491     address pc): MemPointerRecordEx(addr, flags, size, pc) {
 492     _seq = SequenceGenerator::next();
 493   }
 494 
 495   SeqMemPointerRecordEx(const SeqMemPointerRecordEx& copy_from)
 496     : MemPointerRecordEx(copy_from) {
 497     _seq = copy_from.seq();
 498   }
 499 
 500   SeqMemPointerRecordEx& operator= (const SeqMemPointerRecordEx& ptr) {
 501     MemPointerRecordEx::operator=(ptr);
 502     _seq = ptr.seq();
 503     return *this;
 504   }
 505 
 506   inline jint seq() const {
 507     return _seq;
 508   }
 509 };
 510 
 511 #endif // SHARE_VM_SERVICES_MEM_PTR_HPP
   1 /*
   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.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 440     VMMemRegion::operator=(other);
 441     _pc = other.pc();
 442     return *this;
 443   }
 444 
 445   inline address pc() const { return _pc; }
 446  private:
 447   address   _pc;
 448 };
 449 
 450 /*
 451  * Sequenced memory record
 452  */
 453 class SeqMemPointerRecord : public MemPointerRecord {
 454  private:
 455    jint _seq;  // sequence number
 456 
 457  public:
 458   SeqMemPointerRecord(): _seq(0){ }
 459 
 460   SeqMemPointerRecord(address addr, MEMFLAGS flags, size_t size, jint seq)
 461     : MemPointerRecord(addr, flags, size), _seq(seq)  {

 462   }
 463 
 464   SeqMemPointerRecord(const SeqMemPointerRecord& copy_from)
 465     : MemPointerRecord(copy_from) {
 466     _seq = copy_from.seq();
 467   }
 468 
 469   SeqMemPointerRecord& operator= (const SeqMemPointerRecord& ptr) {
 470     MemPointerRecord::operator=(ptr);
 471     _seq = ptr.seq();
 472     return *this;
 473   }
 474 
 475   inline jint seq() const {
 476     return _seq;
 477   }
 478 };
 479 
 480 
 481 
 482 class SeqMemPointerRecordEx : public MemPointerRecordEx {
 483  private:
 484   jint    _seq;  // sequence number
 485 
 486  public:
 487   SeqMemPointerRecordEx(): _seq(0) { }
 488 
 489   SeqMemPointerRecordEx(address addr, MEMFLAGS flags, size_t size,
 490     jint seq, address pc):
 491     MemPointerRecordEx(addr, flags, size, pc), _seq(seq)  {
 492   }
 493 
 494   SeqMemPointerRecordEx(const SeqMemPointerRecordEx& copy_from)
 495     : MemPointerRecordEx(copy_from) {
 496     _seq = copy_from.seq();
 497   }
 498 
 499   SeqMemPointerRecordEx& operator= (const SeqMemPointerRecordEx& ptr) {
 500     MemPointerRecordEx::operator=(ptr);
 501     _seq = ptr.seq();
 502     return *this;
 503   }
 504 
 505   inline jint seq() const {
 506     return _seq;
 507   }
 508 };
 509 
 510 #endif // SHARE_VM_SERVICES_MEM_PTR_HPP
src/share/vm/services/memPtr.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File