< prev index next > src/hotspot/share/runtime/stackChunkFrameStream.hpp
Print this page
#ifndef SHARE_RUNTIME_STACKCHUNKFRAMESTREAM_HPP
#define SHARE_RUNTIME_STACKCHUNKFRAMESTREAM_HPP
#include "memory/allocation.hpp"
+ #include "memory/iterator.hpp"
#include "oops/oopsHierarchy.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
class CodeBlob;
CodeBlob* cb() const { return _cb; }
inline void get_cb();
const ImmutableOopMap* oopmap() const { if (_oopmap == nullptr) get_oopmap(); return _oopmap; }
inline int frame_size() const;
inline int stack_argsize() const;
- inline int num_oops() const;
+ template <typename RegisterMapT>
+ inline int num_oops(RegisterMapT* map) const;
inline void initialize_register_map(RegisterMap* map);
template <typename RegisterMapT> inline void next(RegisterMapT* map, bool stop = false);
template <typename RegisterMapT> inline void update_reg_map(RegisterMapT* map);
private:
inline address get_pc() const;
inline int interpreter_frame_size() const;
- inline int interpreter_frame_num_oops() const;
+ template <typename RegisterMapT>
+ inline int interpreter_frame_num_oops(RegisterMapT* map) const;
inline int interpreter_frame_stack_argsize() const;
inline void next_for_interpreter_frame();
inline intptr_t* unextended_sp_for_interpreter_frame() const;
inline intptr_t* derelativize(int offset) const;
inline void get_oopmap() const;
inline void iterate_oops(OopClosureType* closure, const RegisterMapT* map) const;
template <class DerivedOopClosureType, class RegisterMapT>
inline void iterate_derived_pointers(DerivedOopClosureType* closure, const RegisterMapT* map) const;
};
+ class InterpreterOopCount : public OopClosure {
+ int _count;
+ public:
+ InterpreterOopCount() : _count(0) {}
+ void do_oop(oop* p) override { _count++; }
+ void do_oop(narrowOop* p) override { _count++; }
+ int count() { return _count; }
+ };
+
#endif // SHARE_RUNTIME_STACKCHUNKFRAMESTREAM_HPP
< prev index next >