src/os/bsd/dtrace/generateJvmOffsets.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7104565 Sdiff src/os/bsd/dtrace

src/os/bsd/dtrace/generateJvmOffsets.cpp

Print this page


   1 /*
   2  * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
   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 it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 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 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  43 #include "code/pcDesc.hpp"
  44 #include "gc_interface/collectedHeap.hpp"
  45 #include "memory/heap.hpp"
  46 #include "memory/memRegion.hpp"
  47 #include "memory/universe.hpp"
  48 #include "oops/constMethod.hpp"
  49 #include "oops/klass.hpp"
  50 #include "oops/method.hpp"
  51 #include "oops/oop.hpp"
  52 #include "oops/symbol.hpp"
  53 #include "runtime/virtualspace.hpp"
  54 #include "runtime/vmStructs.hpp"
  55 #include "utilities/accessFlags.hpp"
  56 #include "utilities/globalDefinitions.hpp"
  57 
  58 // These are defined somewhere for Solaris
  59 #define PR_MODEL_ILP32 1
  60 #define PR_MODEL_LP64  2
  61 
  62 #ifdef COMPILER1
  63 #if defined(DEBUG) || defined(FASTDEBUG)
  64 
  65 /*
  66  * To avoid the most part of potential link errors
  67  * we link this program with -z nodefs .
  68  *
  69  * But for 'debug1' and 'fastdebug1' we still have to provide
  70  * a particular workaround for the following symbols bellow.
  71  * It will be good to find out a generic way in the future.
  72  */
  73 
  74 #pragma weak tty
  75 #pragma weak CMSExpAvgFactor
  76 
  77 #if defined(i386) || defined(__i386) || defined(__amd64)
  78 #pragma weak noreg
  79 #endif /* i386 */
  80 
  81 LIR_Opr LIR_OprFact::illegalOpr = (LIR_Opr) 0;
  82 
  83 address StubRoutines::_call_stub_return_address = NULL;
  84 
  85 StubQueue* AbstractInterpreter::_code = NULL;
  86 
  87 #endif /* defined(DEBUG) || defined(FASTDEBUG) */
  88 #endif /* COMPILER1 */
  89 
  90 #define GEN_OFFS(Type,Name)                             \
  91   switch(gen_variant) {                                 \
  92   case GEN_OFFSET:                                      \
  93     printf("#define OFFSET_%-33s %ld\n",                 \
  94            #Type #Name, offset_of(Type, Name)); \
  95     break;                                              \
  96   case GEN_INDEX:                                       \
  97     printf("#define IDX_OFFSET_%-33s %d\n",             \
  98             #Type #Name, index++);                      \
  99     break;                                              \
 100   case GEN_TABLE:                                       \
 101     printf("\tOFFSET_%s,\n", #Type #Name);              \
 102     break;                                              \
 103   }
 104 
 105 #define GEN_SIZE(Type)                                  \
 106   switch(gen_variant) {                                 \
 107   case GEN_OFFSET:                                      \


   1 /*
   2  * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
   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 it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 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 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  43 #include "code/pcDesc.hpp"
  44 #include "gc_interface/collectedHeap.hpp"
  45 #include "memory/heap.hpp"
  46 #include "memory/memRegion.hpp"
  47 #include "memory/universe.hpp"
  48 #include "oops/constMethod.hpp"
  49 #include "oops/klass.hpp"
  50 #include "oops/method.hpp"
  51 #include "oops/oop.hpp"
  52 #include "oops/symbol.hpp"
  53 #include "runtime/virtualspace.hpp"
  54 #include "runtime/vmStructs.hpp"
  55 #include "utilities/accessFlags.hpp"
  56 #include "utilities/globalDefinitions.hpp"
  57 
  58 // These are defined somewhere for Solaris
  59 #define PR_MODEL_ILP32 1
  60 #define PR_MODEL_LP64  2
  61 
  62 #ifdef COMPILER1
  63 #ifdef ASSERT
  64 
  65 /*
  66  * To avoid the most part of potential link errors
  67  * we link this program with -z nodefs .
  68  *
  69  * But for 'debug1' and 'fastdebug1' we still have to provide
  70  * a particular workaround for the following symbols bellow.
  71  * It will be good to find out a generic way in the future.
  72  */
  73 
  74 #pragma weak tty
  75 #pragma weak CMSExpAvgFactor
  76 
  77 #if defined(i386) || defined(__i386) || defined(__amd64)
  78 #pragma weak noreg
  79 #endif /* i386 */
  80 
  81 LIR_Opr LIR_OprFact::illegalOpr = (LIR_Opr) 0;
  82 
  83 address StubRoutines::_call_stub_return_address = NULL;
  84 
  85 StubQueue* AbstractInterpreter::_code = NULL;
  86 
  87 #endif /* ASSERT */
  88 #endif /* COMPILER1 */
  89 
  90 #define GEN_OFFS(Type,Name)                             \
  91   switch(gen_variant) {                                 \
  92   case GEN_OFFSET:                                      \
  93     printf("#define OFFSET_%-33s %ld\n",                 \
  94            #Type #Name, offset_of(Type, Name)); \
  95     break;                                              \
  96   case GEN_INDEX:                                       \
  97     printf("#define IDX_OFFSET_%-33s %d\n",             \
  98             #Type #Name, index++);                      \
  99     break;                                              \
 100   case GEN_TABLE:                                       \
 101     printf("\tOFFSET_%s,\n", #Type #Name);              \
 102     break;                                              \
 103   }
 104 
 105 #define GEN_SIZE(Type)                                  \
 106   switch(gen_variant) {                                 \
 107   case GEN_OFFSET:                                      \


src/os/bsd/dtrace/generateJvmOffsets.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File