comparison src/share/vm/runtime/os.hpp @ 1681:126ea7725993

6953477: Increase portability and flexibility of building Hotspot Summary: A collection of portability improvements including shared code support for PPC, ARM platforms, software floating point, cross compilation support and improvements in error crash detail. Reviewed-by: phh, never, coleenp, dholmes
author bobv
date Tue, 03 Aug 2010 08:13:38 -0400
parents c18cbe5936b8
children 1e9a9d2e6509
comparison
equal deleted inserted replaced
1680:a64438a2b7e8 1681:126ea7725993
1 /* 1 /*
2 * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2010, 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.
76 _page_sizes[0] = default_page_size; 76 _page_sizes[0] = default_page_size;
77 _page_sizes[1] = 0; // sentinel 77 _page_sizes[1] = 0; // sentinel
78 } 78 }
79 79
80 public: 80 public:
81 static void init(void); // Called before command line parsing 81
82 static jint init_2(void); // Called after command line parsing 82 static void init(void); // Called before command line parsing
83 static jint init_2(void); // Called after command line parsing
84 static void init_3(void); // Called at the end of vm init
83 85
84 // File names are case-insensitive on windows only 86 // File names are case-insensitive on windows only
85 // Override me as needed 87 // Override me as needed
86 static int file_name_strcmp(const char* s1, const char* s2); 88 static int file_name_strcmp(const char* s1, const char* s2);
87 89
320 vm_thread, 322 vm_thread,
321 cgc_thread, // Concurrent GC thread 323 cgc_thread, // Concurrent GC thread
322 pgc_thread, // Parallel GC thread 324 pgc_thread, // Parallel GC thread
323 java_thread, 325 java_thread,
324 compiler_thread, 326 compiler_thread,
325 watcher_thread 327 watcher_thread,
328 os_thread
326 }; 329 };
327 330
328 static bool create_thread(Thread* thread, 331 static bool create_thread(Thread* thread,
329 ThreadType thr_type, 332 ThreadType thr_type,
330 size_t stack_size = 0); 333 size_t stack_size = 0);
449 static void print_context(outputStream* st, void* context); 452 static void print_context(outputStream* st, void* context);
450 static void print_siginfo(outputStream* st, void* siginfo); 453 static void print_siginfo(outputStream* st, void* siginfo);
451 static void print_signal_handlers(outputStream* st, char* buf, size_t buflen); 454 static void print_signal_handlers(outputStream* st, char* buf, size_t buflen);
452 static void print_date_and_time(outputStream* st); 455 static void print_date_and_time(outputStream* st);
453 456
457 static void print_location(outputStream* st, intptr_t x, bool print_pc = false);
458
454 // The following two functions are used by fatal error handler to trace 459 // The following two functions are used by fatal error handler to trace
455 // native (C) frames. They are not part of frame.hpp/frame.cpp because 460 // native (C) frames. They are not part of frame.hpp/frame.cpp because
456 // frame.hpp/cpp assume thread is JavaThread, and also because different 461 // frame.hpp/cpp assume thread is JavaThread, and also because different
457 // OS/compiler may have different convention or provide different API to 462 // OS/compiler may have different convention or provide different API to
458 // walk C frames. 463 // walk C frames.
478 static void* native_java_library(); 483 static void* native_java_library();
479 484
480 // Fills in path to jvm.dll/libjvm.so (this info used to find hpi). 485 // Fills in path to jvm.dll/libjvm.so (this info used to find hpi).
481 static void jvm_path(char *buf, jint buflen); 486 static void jvm_path(char *buf, jint buflen);
482 487
488 // Returns true if we are running in a headless jre.
489 static bool is_headless_jre();
490
483 // JNI names 491 // JNI names
484 static void print_jni_name_prefix_on(outputStream* st, int args_size); 492 static void print_jni_name_prefix_on(outputStream* st, int args_size);
485 static void print_jni_name_suffix_on(outputStream* st, int args_size); 493 static void print_jni_name_suffix_on(outputStream* st, int args_size);
486 494
487 // File conventions 495 // File conventions
578 static bool obsolete_option(const JavaVMOption *option); 586 static bool obsolete_option(const JavaVMOption *option);
579 587
580 // Platform dependent stuff 588 // Platform dependent stuff
581 #include "incls/_os_pd.hpp.incl" 589 #include "incls/_os_pd.hpp.incl"
582 590
583 // debugging support (mostly used by debug.cpp) 591 // debugging support (mostly used by debug.cpp but also fatal error handler)
584 static bool find(address pc) PRODUCT_RETURN0; // OS specific function to make sense out of an address 592 static bool find(address pc, outputStream* st = tty); // OS specific function to make sense out of an address
585 593
586 static bool dont_yield(); // when true, JVM_Yield() is nop 594 static bool dont_yield(); // when true, JVM_Yield() is nop
587 static void print_statistics(); 595 static void print_statistics();
588 596
589 // Thread priority helpers (implemented in OS-specific part) 597 // Thread priority helpers (implemented in OS-specific part)