src/share/vm/utilities/nativeCallStack.hpp

changeset 9485
7a6239517d46
parent 9337
fc1c693e80bb
     1.1 --- a/src/share/vm/utilities/nativeCallStack.hpp	Wed Sep 19 14:26:01 2018 -0400
     1.2 +++ b/src/share/vm/utilities/nativeCallStack.hpp	Wed Sep 19 19:48:12 2018 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -51,18 +51,23 @@
    1.11   * 2. The class is strict stack object, no heap or virtual memory can be allocated
    1.12   *    from it.
    1.13   */
    1.14 +class MemTracker;
    1.15 +
    1.16  class NativeCallStack : public StackObj {
    1.17 - public:
    1.18 -  static const NativeCallStack EMPTY_STACK;
    1.19 +  friend class MemTracker;
    1.20  
    1.21 - private:
    1.22 +private:
    1.23    address       _stack[NMT_TrackingStackDepth];
    1.24    unsigned int  _hash_value;
    1.25  
    1.26 - public:
    1.27 +  static NativeCallStack EMPTY_STACK;
    1.28 +public:
    1.29    NativeCallStack(int toSkip = 0, bool fillStack = false);
    1.30    NativeCallStack(address* pc, int frameCount);
    1.31  
    1.32 +  static inline const NativeCallStack& empty_stack() {
    1.33 +    return EMPTY_STACK;
    1.34 +  }
    1.35  
    1.36    // if it is an empty stack
    1.37    inline bool is_empty() const {

mercurial