5539N/A * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 0N/A * Redistribution and use in source and binary forms, with or without 0N/A * modification, are permitted provided that the following conditions 0N/A * - Redistributions of source code must retain the above copyright 0N/A * notice, this list of conditions and the following disclaimer. 0N/A * - Redistributions in binary form must reproduce the above copyright 0N/A * notice, this list of conditions and the following disclaimer in the 0N/A * documentation and/or other materials provided with the distribution. 2362N/A * - Neither the name of Oracle nor the names of its 0N/A * contributors may be used to endorse or promote products derived 0N/A * from this software without specific prior written permission. 0N/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 0N/A * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 0N/A * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 0N/A * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 0N/A * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 0N/A * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 0N/A * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 0N/A * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 0N/A * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 0N/A * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 0N/A * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 4378N/A * This source code is provided to illustrate the usage of a given feature 4378N/A * or technique and has been deliberately simplified. Additional steps 4378N/A * required for a production-quality application, such as security checks, 4378N/A * input validation and proper error handling, might not be present in 0N/A/* Primary hprof #include file, should be included by most if not 0N/A * all hprof source files. Gives access to the global data structure 0N/A * and all global macros, and everything declared in the #include 0N/A * files of each of the source files. 0N/A/* Standard C functions used throughout. */ 0N/A/* General JVM/Java functions, types and macros. */ 0N/A#
include "npt.h" /* To get NptEnv for doing character conversions */ 0N/A/* Macros to extract the upper and lower 32 bits of a jlong */ 0N/A/* The type used to contain a generic 32bit "serial number". */ 0N/A/* How the options get to OnLoad: */ 0N/A/* Name of prelude file, found at runtime relative to java binary location */ 0N/A/* File I/O buffer size to be used with any file i/o operation */ 0N/A/* Machine dependent functions. */ 0N/A/* Table index types */ 0N/A/* Index for method tables in classes */ 0N/A/* The different kinds of class status bits. */ 0N/A/* The different kind of objects we track with heap=dump */ 0N/A/* Used by site_write() when writing out the heap=sites data. */ 0N/A/* Used to hold information about a field, and potentially a value too. */ 0N/A/* Used to hold information about a constant pool entry value for a class. */ 0N/A/* All machine independent functions */ 0N/A/* Global data structure */ 0N/A /* Option settings */ 0N/A int fd;
/* file or socket (net=addr). */ 0N/A /* Stack of objects freed during GC */ 0N/A /* Lock for debug_malloc() */ 0N/A /* Count of classes that JVMTI thinks are active */ 0N/A /* Used to track callbacks for VM_DEATH */ 0N/A /* Running totals on all bytes allocated */ 0N/A /* Running total on all time spent in GC (very rough estimate) */ 0N/A /* Global Data access Lock */ 0N/A /* Global Dump lock */ 0N/A /* Milli-second clock when hprof onload started */ 0N/A /* Thread class (for starting agent threads) */ 0N/A /* Agent threads started information */ 0N/A /* Output buffer, position, size, and position in dump if reading */ 0N/A * tls (thread local storage), and traces. 0N/A /* The methodID for the Object <init> method. */ 0N/A /* Keeping track of the tracker class and it's methods */ 0N/A /* Index to some common items */ 0N/A /* Tables for strings, classes, sites, etc. */ 0N/A /* Handles to java_crw_demo library */ 0N/A /* Indication that the agent has been loaded */ 0N/A/* This should be the only 'extern' in the library (not exported). */