--- old/src/os/windows/vm/os_windows.cpp Thu Jun 21 18:15:25 2018 +++ new/src/os/windows/vm/os_windows.cpp Thu Jun 21 18:15:25 2018 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -716,6 +716,16 @@ #endif int os::active_processor_count() { + // User has overridden the number of active processors + if (ActiveProcessorCount > 0) { + if (PrintActiveCpus) { + tty->print_cr("active_processor_count: " + "active processor count set by user : %d", + ActiveProcessorCount); + } + return ActiveProcessorCount; + } + DWORD_PTR lpProcessAffinityMask = 0; DWORD_PTR lpSystemAffinityMask = 0; int proc_count = processor_count();