2161 if (fgets(buf, buflen, fp)) { |
2161 if (fgets(buf, buflen, fp)) { |
2162 // Assume model name comes before flags |
2162 // Assume model name comes before flags |
2163 bool model_name_printed = false; |
2163 bool model_name_printed = false; |
2164 if (strstr(buf, "model name") != NULL) { |
2164 if (strstr(buf, "model name") != NULL) { |
2165 if (!model_name_printed) { |
2165 if (!model_name_printed) { |
2166 st->print_raw("\nCPU Model and flags from /proc/cpuinfo:\n"); |
2166 st->print_raw("CPU Model and flags from /proc/cpuinfo:\n"); |
2167 st->print_raw(buf); |
2167 st->print_raw(buf); |
2168 model_name_printed = true; |
2168 model_name_printed = true; |
2169 } else { |
2169 } else { |
2170 // model name printed but not flags? Odd, just return |
2170 // model name printed but not flags? Odd, just return |
2171 fclose(fp); |
2171 fclose(fp); |
4669 // Allocate a single page and mark it as readable for safepoint polling |
4669 // Allocate a single page and mark it as readable for safepoint polling |
4670 address polling_page = (address) ::mmap(NULL, Linux::page_size(), PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); |
4670 address polling_page = (address) ::mmap(NULL, Linux::page_size(), PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); |
4671 guarantee(polling_page != MAP_FAILED, "os::init_2: failed to allocate polling page"); |
4671 guarantee(polling_page != MAP_FAILED, "os::init_2: failed to allocate polling page"); |
4672 |
4672 |
4673 os::set_polling_page(polling_page); |
4673 os::set_polling_page(polling_page); |
4674 |
4674 log_info(os)("SafePoint Polling address: " INTPTR_FORMAT, p2i(polling_page)); |
4675 #ifndef PRODUCT |
|
4676 if (Verbose && PrintMiscellaneous) { |
|
4677 tty->print("[SafePoint Polling address: " INTPTR_FORMAT "]\n", |
|
4678 (intptr_t)polling_page); |
|
4679 } |
|
4680 #endif |
|
4681 |
4675 |
4682 if (!UseMembar) { |
4676 if (!UseMembar) { |
4683 address mem_serialize_page = (address) ::mmap(NULL, Linux::page_size(), PROT_READ | PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); |
4677 address mem_serialize_page = (address) ::mmap(NULL, Linux::page_size(), PROT_READ | PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); |
4684 guarantee(mem_serialize_page != MAP_FAILED, "mmap Failed for memory serialize page"); |
4678 guarantee(mem_serialize_page != MAP_FAILED, "mmap Failed for memory serialize page"); |
4685 os::set_memory_serialize_page(mem_serialize_page); |
4679 os::set_memory_serialize_page(mem_serialize_page); |
4686 |
4680 log_info(os)("Memory Serialize Page address: " INTPTR_FORMAT, p2i(mem_serialize_page)); |
4687 #ifndef PRODUCT |
|
4688 if (Verbose && PrintMiscellaneous) { |
|
4689 tty->print("[Memory Serialize Page address: " INTPTR_FORMAT "]\n", |
|
4690 (intptr_t)mem_serialize_page); |
|
4691 } |
|
4692 #endif |
|
4693 } |
4681 } |
4694 |
4682 |
4695 // initialize suspend/resume support - must do this before signal_sets_init() |
4683 // initialize suspend/resume support - must do this before signal_sets_init() |
4696 if (SR_initialize() != 0) { |
4684 if (SR_initialize() != 0) { |
4697 perror("SR_initialize failed"); |
4685 perror("SR_initialize failed"); |
4730 #if defined(IA32) |
4718 #if defined(IA32) |
4731 workaround_expand_exec_shield_cs_limit(); |
4719 workaround_expand_exec_shield_cs_limit(); |
4732 #endif |
4720 #endif |
4733 |
4721 |
4734 Linux::libpthread_init(); |
4722 Linux::libpthread_init(); |
4735 if (PrintMiscellaneous && (Verbose || WizardMode)) { |
4723 log_info(os)("HotSpot is running with %s, %s", |
4736 tty->print_cr("[HotSpot is running with %s, %s]\n", |
4724 Linux::glibc_version(), Linux::libpthread_version()); |
4737 Linux::glibc_version(), Linux::libpthread_version()); |
|
4738 } |
|
4739 |
4725 |
4740 if (UseNUMA) { |
4726 if (UseNUMA) { |
4741 if (!Linux::libnuma_init()) { |
4727 if (!Linux::libnuma_init()) { |
4742 UseNUMA = false; |
4728 UseNUMA = false; |
4743 } else { |
4729 } else { |
4774 // set the number of file descriptors to max. print out error |
4760 // set the number of file descriptors to max. print out error |
4775 // if getrlimit/setrlimit fails but continue regardless. |
4761 // if getrlimit/setrlimit fails but continue regardless. |
4776 struct rlimit nbr_files; |
4762 struct rlimit nbr_files; |
4777 int status = getrlimit(RLIMIT_NOFILE, &nbr_files); |
4763 int status = getrlimit(RLIMIT_NOFILE, &nbr_files); |
4778 if (status != 0) { |
4764 if (status != 0) { |
4779 if (PrintMiscellaneous && (Verbose || WizardMode)) { |
4765 log_info(os)("os::init_2 getrlimit failed: %s", os::strerror(errno)); |
4780 perror("os::init_2 getrlimit failed"); |
|
4781 } |
|
4782 } else { |
4766 } else { |
4783 nbr_files.rlim_cur = nbr_files.rlim_max; |
4767 nbr_files.rlim_cur = nbr_files.rlim_max; |
4784 status = setrlimit(RLIMIT_NOFILE, &nbr_files); |
4768 status = setrlimit(RLIMIT_NOFILE, &nbr_files); |
4785 if (status != 0) { |
4769 if (status != 0) { |
4786 if (PrintMiscellaneous && (Verbose || WizardMode)) { |
4770 log_info(os)("os::init_2 setrlimit failed: %s", os::strerror(errno)); |
4787 perror("os::init_2 setrlimit failed"); |
|
4788 } |
|
4789 } |
4771 } |
4790 } |
4772 } |
4791 } |
4773 } |
4792 |
4774 |
4793 // Initialize lock used to serialize thread creation (see os::create_thread) |
4775 // Initialize lock used to serialize thread creation (see os::create_thread) |