Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/shark/sharkStateScanner.hpp
32285 views
/*1* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.2* Copyright 2008, 2009 Red Hat, Inc.3* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4*5* This code is free software; you can redistribute it and/or modify it6* under the terms of the GNU General Public License version 2 only, as7* published by the Free Software Foundation.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 2 along with this work; if not, write to the Free Software Foundation,17* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18*19* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*23*/2425#ifndef SHARE_VM_SHARK_SHARKSTATESCANNER_HPP26#define SHARE_VM_SHARK_SHARKSTATESCANNER_HPP2728#include "memory/allocation.hpp"29#include "shark/llvmHeaders.hpp"30#include "shark/sharkFunction.hpp"31#include "shark/sharkInvariants.hpp"3233class SharkState;3435class SharkStateScanner : public SharkTargetInvariants {36protected:37SharkStateScanner(SharkFunction* function)38: SharkTargetInvariants(function), _stack(function->stack()) {}3940private:41SharkStack* _stack;4243protected:44SharkStack* stack() const {45return _stack;46}4748// Scan the frame49public:50void scan(SharkState* state);5152// Callbacks53// Note that the offsets supplied to the various process_* callbacks54// are specified in wordSize words from the frame's unextended_sp.55protected:56virtual void start_frame() {}5758virtual void start_stack(int stack_depth) {}59virtual void process_stack_slot(int index, SharkValue** value, int offset) {}60virtual void end_stack() {}6162virtual void start_monitors(int num_monitors) {}63virtual void process_monitor(int index, int box_offset, int obj_offset) {}64virtual void end_monitors() {}6566virtual void start_frame_header() {}67virtual void process_oop_tmp_slot(llvm::Value** value, int offset) {}68virtual void process_method_slot(llvm::Value** value, int offset) {}69virtual void process_pc_slot(int offset) {}70virtual void end_frame_header() {}7172virtual void start_locals() {}73virtual void process_local_slot(int index, SharkValue** value, int offset) {}74virtual void end_locals() {}7576virtual void end_frame() {}7778// Integrity checks79private:80void stack_integrity_checks(SharkState* state) PRODUCT_RETURN;81void locals_integrity_checks(SharkState* state) PRODUCT_RETURN;82};8384#endif // SHARE_VM_SHARK_SHARKSTATESCANNER_HPP858687