os_share_solaris.hpp revision 1879:f95d63e2154a
111568Sjkh/* 211568Sjkh * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 311568Sjkh * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 411568Sjkh * 511568Sjkh * This code is free software; you can redistribute it and/or modify it 611568Sjkh * under the terms of the GNU General Public License version 2 only, as 750479Speter * published by the Free Software Foundation. 811568Sjkh * 911568Sjkh * This code is distributed in the hope that it will be useful, but WITHOUT 1011568Sjkh * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1111568Sjkh * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1211568Sjkh * version 2 for more details (a copy is included in the LICENSE file that 1311568Sjkh * accompanied this code). 1411568Sjkh * 1511568Sjkh * You should have received a copy of the GNU General Public License version 1611568Sjkh * 2 along with this work; if not, write to the Free Software Foundation, 1711568Sjkh * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1811568Sjkh * 1911568Sjkh * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2011568Sjkh * or visit www.oracle.com if you need additional information or have any 2111568Sjkh * questions. 2211568Sjkh * 2311568Sjkh */ 2411568Sjkh 2511568Sjkh#ifndef OS_SOLARIS_VM_OS_SHARE_SOLARIS_HPP 2611568Sjkh#define OS_SOLARIS_VM_OS_SHARE_SOLARIS_HPP 2711568Sjkh 2811568Sjkh// Defines the interfaces to Solaris operating systems that vary across platforms 2911568Sjkh 3011568Sjkh 3111568Sjkh// This is a simple callback that just fetches a PC for an interrupted thread. 3211568Sjkh// The thread need not be suspended and the fetched PC is just a hint. 3311568Sjkh// Returned PC and nPC are not necessarily consecutive. 3411568Sjkh// This one is currently used for profiling the VMThread ONLY! 3511568Sjkh 3611568Sjkh// Must be synchronous 3711568Sjkhclass GetThreadPC_Callback : public OSThread::Sync_Interrupt_Callback { 3811568Sjkh private: 3911568Sjkh ExtendedPC _addr; 4011568Sjkh 4111568Sjkh public: 4211568Sjkh 4311568Sjkh GetThreadPC_Callback(Monitor *sync) : 4411568Sjkh OSThread::Sync_Interrupt_Callback(sync) { } 4511568Sjkh ExtendedPC addr() const { return _addr; } 4611568Sjkh 4711568Sjkh void set_addr(ExtendedPC addr) { _addr = addr; } 4829222Sjkh 4929222Sjkh void execute(OSThread::InterruptArguments *args); 5011568Sjkh}; 5111568Sjkh 5211568Sjkh// misc 5311568Sjkhextern "C" { 5411568Sjkh void signalHandler(int, siginfo_t*, void*); 5511568Sjkh} 5611568Sjkhvoid resolve_lwp_exit_calls(void); 5711568Sjkhvoid handle_unexpected_exception(Thread* thread, int sig, siginfo_t* info, address pc, address adjusted_pc); 5811568Sjkh#ifndef PRODUCT 5911568Sjkhvoid continue_with_dump(void); 6098079Sobrien#endif 6111568Sjkh 6211568Sjkh#if defined(__sparc) && defined(COMPILER2) 6311568Sjkh// For Sun Studio compiler implementation is in file 6411568Sjkh// src/os_cpu/solaris_sparc/vm/solaris_sparc.il 6543949Sjkh// For gcc implementation is in file 6611568Sjkh// src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp 6711568Sjkhextern "C" void _mark_fpu_nosave() ; 6811568Sjkh#endif 6911568Sjkh 7043949Sjkh#define PROCFILE_LENGTH 128 71159113Sceri 7282680Sjkh#endif // OS_SOLARIS_VM_OS_SHARE_SOLARIS_HPP 7311568Sjkh