< prev index next >

src/hotspot/share/jfr/leakprofiler/chains/edgeStore.hpp

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2014, 2019, 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
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.
--- 1,7 ---
  /*
!  * Copyright (c) 2014, 2021, 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
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

*** 29,10 ***
--- 29,11 ---
  #include "jfr/leakprofiler/utilities/unifiedOopRef.hpp"
  #include "jfr/utilities/jfrHashtable.hpp"
  #include "memory/allocation.hpp"
  
  typedef u8 traceid;
+ class ObjectSample;
  
  class StoredEdge : public Edge {
   private:
    mutable traceid _gc_root_id;
    size_t _skip_length;

*** 77,10 ***
--- 78,11 ---
    void on_link(EdgeEntry* entry);
    bool on_equals(uintptr_t hash, const EdgeEntry* entry);
    void on_unlink(EdgeEntry* entry);
  
    StoredEdge* get(UnifiedOopRef reference) const;
+   const StoredEdge* get(const ObjectSample* sample) const;
    StoredEdge* put(UnifiedOopRef reference);
    traceid gc_root_id(const Edge* edge) const;
  
    bool put_edges(StoredEdge** previous, const Edge** current, size_t length);
    bool put_skip_edge(StoredEdge** previous, const Edge** current, size_t distance_to_root);

*** 88,10 ***
--- 90,11 ---
  
    StoredEdge* associate_leak_context_with_candidate(const Edge* edge);
    void store_gc_root_id_in_leak_context_edge(StoredEdge* leak_context_edge, const Edge* root) const;
    StoredEdge* link_new_edge(StoredEdge** previous, const Edge** current);
    void link_with_existing_chain(const StoredEdge* current_stored, StoredEdge** previous, size_t previous_length);
+   bool has_leak_context(const ObjectSample* sample) const;
  
    template <typename T>
    void iterate(T& functor) const { _edges->iterate_value<T>(functor); }
  
    DEBUG_ONLY(bool contains(UnifiedOopRef reference) const;)
< prev index next >