make/hotspot/src/native/dtrace/generateJvmOffsets.cpp
changeset 49124 6abbc1f5c2a1
parent 47216 71c04702a3d5
child 49553 58cffb6ec13c
equal deleted inserted replaced
49123:d8057fc6fffc 49124:6abbc1f5c2a1
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
     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.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   295   printf("\n");
   295   printf("\n");
   296 
   296 
   297   fflush(stdout);
   297   fflush(stdout);
   298   return 0;
   298   return 0;
   299 }
   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 }