From 90bb99a6a2ba88aad18f0ed6e4ad9976bd27df34 Mon Sep 17 00:00:00 2001 From: Dmitrii Ishcheikin Date: Tue, 30 Jan 2024 16:11:34 +0000 Subject: Add visibility attributes in runtime/s* Bug: 260881207 Test: presubmit Test: abtd app_compat_drm Test: abtd app_compat_top_100 Test: abtd app_compat_banking Change-Id: Ib074e7b5ab0725fea5640ed7deaac3452fc27864 --- runtime/stack.h | 74 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 38 insertions(+), 36 deletions(-) (limited to 'runtime/stack.h') diff --git a/runtime/stack.h b/runtime/stack.h index 46f0d084fe..71948b25d3 100644 --- a/runtime/stack.h +++ b/runtime/stack.h @@ -29,7 +29,7 @@ #include "obj_ptr.h" #include "quick/quick_method_frame_info.h" -namespace art { +namespace art HIDDEN { namespace mirror { class Object; @@ -118,10 +118,10 @@ class StackVisitor { }; protected: - StackVisitor(Thread* thread, - Context* context, - StackWalkKind walk_kind, - bool check_suspended = true); + EXPORT StackVisitor(Thread* thread, + Context* context, + StackWalkKind walk_kind, + bool check_suspended = true); bool GetRegisterIfAccessible(uint32_t reg, DexRegisterLocation::Kind kind, uint32_t* val) const REQUIRES_SHARED(Locks::mutator_lock_); @@ -134,13 +134,13 @@ class StackVisitor { // Return 'true' if we should continue to visit more frames, 'false' to stop. virtual bool VisitFrame() REQUIRES_SHARED(Locks::mutator_lock_) = 0; - enum class CountTransitions { + enum class EXPORT CountTransitions { kYes, kNo, }; template - void WalkStack(bool include_transitions = false) REQUIRES_SHARED(Locks::mutator_lock_); + EXPORT void WalkStack(bool include_transitions = false) REQUIRES_SHARED(Locks::mutator_lock_); // Convenience helper function to walk the stack with a lambda as a visitor. template ComputeDexPcList(uint32_t handler_dex_pc) const REQUIRES_SHARED(Locks::mutator_lock_); - ObjPtr GetThisObject() const REQUIRES_SHARED(Locks::mutator_lock_); + EXPORT ObjPtr GetThisObject() const REQUIRES_SHARED(Locks::mutator_lock_); - size_t GetNativePcOffset() const REQUIRES_SHARED(Locks::mutator_lock_); + EXPORT size_t GetNativePcOffset() const REQUIRES_SHARED(Locks::mutator_lock_); // Returns the height of the stack in the managed stack frames, including transitions. size_t GetFrameHeight() REQUIRES_SHARED(Locks::mutator_lock_) { @@ -227,35 +228,37 @@ class StackVisitor { bool GetNextMethodAndDexPc(ArtMethod** next_method, uint32_t* next_dex_pc) REQUIRES_SHARED(Locks::mutator_lock_); - bool GetVReg(ArtMethod* m, - uint16_t vreg, - VRegKind kind, - uint32_t* val, - std::optional location = std::optional(), - bool need_full_register_list = false) const REQUIRES_SHARED(Locks::mutator_lock_); + EXPORT bool GetVReg( + ArtMethod* m, + uint16_t vreg, + VRegKind kind, + uint32_t* val, + std::optional location = std::optional(), + bool need_full_register_list = false) const REQUIRES_SHARED(Locks::mutator_lock_); - bool GetVRegPair(ArtMethod* m, uint16_t vreg, VRegKind kind_lo, VRegKind kind_hi, - uint64_t* val) const - REQUIRES_SHARED(Locks::mutator_lock_); + EXPORT bool GetVRegPair(ArtMethod* m, + uint16_t vreg, + VRegKind kind_lo, + VRegKind kind_hi, + uint64_t* val) const REQUIRES_SHARED(Locks::mutator_lock_); // Values will be set in debugger shadow frames. Debugger will make sure deoptimization // is triggered to make the values effective. - bool SetVReg(ArtMethod* m, uint16_t vreg, uint32_t new_value, VRegKind kind) + EXPORT bool SetVReg(ArtMethod* m, uint16_t vreg, uint32_t new_value, VRegKind kind) REQUIRES_SHARED(Locks::mutator_lock_); // Values will be set in debugger shadow frames. Debugger will make sure deoptimization // is triggered to make the values effective. - bool SetVRegReference(ArtMethod* m, uint16_t vreg, ObjPtr new_value) + EXPORT bool SetVRegReference(ArtMethod* m, uint16_t vreg, ObjPtr new_value) REQUIRES_SHARED(Locks::mutator_lock_); // Values will be set in debugger shadow frames. Debugger will make sure deoptimization // is triggered to make the values effective. - bool SetVRegPair(ArtMethod* m, - uint16_t vreg, - uint64_t new_value, - VRegKind kind_lo, - VRegKind kind_hi) - REQUIRES_SHARED(Locks::mutator_lock_); + EXPORT bool SetVRegPair(ArtMethod* m, + uint16_t vreg, + uint64_t new_value, + VRegKind kind_lo, + VRegKind kind_hi) REQUIRES_SHARED(Locks::mutator_lock_); uintptr_t* GetGPRAddress(uint32_t reg) const; @@ -292,7 +295,7 @@ class StackVisitor { std::string DescribeLocation() const REQUIRES_SHARED(Locks::mutator_lock_); - static size_t ComputeNumFrames(Thread* thread, StackWalkKind walk_kind) + EXPORT static size_t ComputeNumFrames(Thread* thread, StackWalkKind walk_kind) REQUIRES_SHARED(Locks::mutator_lock_); static void DescribeStack(Thread* thread) REQUIRES_SHARED(Locks::mutator_lock_); @@ -330,12 +333,11 @@ class StackVisitor { private: // Private constructor known in the case that num_frames_ has already been computed. - StackVisitor(Thread* thread, - Context* context, - StackWalkKind walk_kind, - size_t num_frames, - bool check_suspended = true) - REQUIRES_SHARED(Locks::mutator_lock_); + EXPORT StackVisitor(Thread* thread, + Context* context, + StackWalkKind walk_kind, + size_t num_frames, + bool check_suspended = true) REQUIRES_SHARED(Locks::mutator_lock_); bool IsAccessibleRegister(uint32_t reg, bool is_float) const { return is_float ? IsAccessibleFPR(reg) : IsAccessibleGPR(reg); -- cgit v1.2.3-59-g8ed1b