< prev index next >

make/hotspot/src/native/dtrace/generateJvmOffsets.cpp

Print this page


   1 /*
   2  * Copyright (c) 2003, 2016, 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  *


 279   GEN_VALUE(SIZE_HeapBlockHeader, (int) sizeof(HeapBlock::Header));
 280   GEN_SIZE(oopDesc);
 281   GEN_SIZE(ConstantPool);
 282   printf("\n");
 283 
 284   GEN_SIZE(PcDesc);
 285   GEN_SIZE(Method);
 286   GEN_SIZE(ConstMethod);
 287   GEN_SIZE(nmethod);
 288   GEN_SIZE(CodeBlob);
 289   GEN_SIZE(BufferBlob);
 290   GEN_SIZE(SingletonBlob);
 291   GEN_SIZE(RuntimeStub);
 292   GEN_SIZE(SafepointBlob);
 293 
 294   gen_epilogue(gen_variant);
 295   printf("\n");
 296 
 297   fflush(stdout);
 298   return 0;



























 299 }
   1 /*
   2  * Copyright (c) 2003, 2018, 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  *


 279   GEN_VALUE(SIZE_HeapBlockHeader, (int) sizeof(HeapBlock::Header));
 280   GEN_SIZE(oopDesc);
 281   GEN_SIZE(ConstantPool);
 282   printf("\n");
 283 
 284   GEN_SIZE(PcDesc);
 285   GEN_SIZE(Method);
 286   GEN_SIZE(ConstMethod);
 287   GEN_SIZE(nmethod);
 288   GEN_SIZE(CodeBlob);
 289   GEN_SIZE(BufferBlob);
 290   GEN_SIZE(SingletonBlob);
 291   GEN_SIZE(RuntimeStub);
 292   GEN_SIZE(SafepointBlob);
 293 
 294   gen_epilogue(gen_variant);
 295   printf("\n");
 296 
 297   fflush(stdout);
 298   return 0;
 299 }
 300 
 301 const char *HELP =
 302     "HELP: generateJvmOffsets {-header | -index | -table} \n";
 303 
 304 int main(int argc, const char *argv[]) {
 305     GEN_variant gen_var;
 306 
 307     if (argc != 2) {
 308         printf("%s", HELP);
 309         return 1;
 310     }
 311 
 312     if (0 == strcmp(argv[1], "-header")) {
 313         gen_var = GEN_OFFSET;
 314     }
 315     else if (0 == strcmp(argv[1], "-index")) {
 316         gen_var = GEN_INDEX;
 317     }
 318     else if (0 == strcmp(argv[1], "-table")) {
 319         gen_var = GEN_TABLE;
 320     }
 321     else {
 322         printf("%s", HELP);
 323         return 1;
 324     }
 325     return generateJvmOffsets(gen_var);
 326 }
< prev index next >