src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Metadata.java
changeset 52514 f4e3900c8d08
parent 47216 71c04702a3d5
equal deleted inserted replaced
52513:d4f3e37d1fda 52514:f4e3900c8d08
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2018, 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.
    24 
    24 
    25 package sun.jvm.hotspot.oops;
    25 package sun.jvm.hotspot.oops;
    26 
    26 
    27 import java.io.*;
    27 import java.io.*;
    28 import java.util.*;
    28 import java.util.*;
       
    29 import sun.jvm.hotspot.memory.*;
    29 import sun.jvm.hotspot.utilities.*;
    30 import sun.jvm.hotspot.utilities.*;
    30 import sun.jvm.hotspot.debugger.*;
    31 import sun.jvm.hotspot.debugger.*;
    31 import sun.jvm.hotspot.runtime.*;
    32 import sun.jvm.hotspot.runtime.*;
    32 import sun.jvm.hotspot.types.*;
    33 import sun.jvm.hotspot.types.*;
    33 
    34 
    85 
    86 
    86   abstract public void printValueOn(PrintStream tty);
    87   abstract public void printValueOn(PrintStream tty);
    87   public void dumpReplayData(PrintStream out) {
    88   public void dumpReplayData(PrintStream out) {
    88       out.println("# Unknown Metadata");
    89       out.println("# Unknown Metadata");
    89   }
    90   }
       
    91 
       
    92   public boolean isShared() {
       
    93     VM vm = VM.getVM();
       
    94     if (vm.isSharingEnabled()) {
       
    95       return MetaspaceObj.isShared(getAddress());
       
    96     }
       
    97     return false;
       
    98   }
    90 }
    99 }