| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 } | 130 } |
| 131 | 131 |
| 132 | 132 |
| 133 v8::TryCatch* ThreadLocalTop::TryCatchHandler() { | 133 v8::TryCatch* ThreadLocalTop::TryCatchHandler() { |
| 134 return TRY_CATCH_FROM_ADDRESS(try_catch_handler_address()); | 134 return TRY_CATCH_FROM_ADDRESS(try_catch_handler_address()); |
| 135 } | 135 } |
| 136 | 136 |
| 137 | 137 |
| 138 int SystemThreadManager::NumberOfParallelSystemThreads( | 138 int SystemThreadManager::NumberOfParallelSystemThreads( |
| 139 ParallelSystemComponent type) { | 139 ParallelSystemComponent type) { |
| 140 int number_of_threads = Min(OS::NumberOfCores(), kMaxThreads); | 140 int number_of_threads = Min(CPU::NumberOfProcessorsOnline(), kMaxThreads); |
| 141 ASSERT(number_of_threads > 0); | 141 ASSERT(number_of_threads > 0); |
| 142 if (number_of_threads == 1) { | 142 if (number_of_threads == 1) { |
| 143 return 0; | 143 return 0; |
| 144 } | 144 } |
| 145 if (type == PARALLEL_SWEEPING) { | 145 if (type == PARALLEL_SWEEPING) { |
| 146 return number_of_threads; | 146 return number_of_threads; |
| 147 } else if (type == CONCURRENT_SWEEPING) { | 147 } else if (type == CONCURRENT_SWEEPING) { |
| 148 return number_of_threads - 1; | 148 return number_of_threads - 1; |
| 149 } else if (type == PARALLEL_MARKING) { | 149 } else if (type == PARALLEL_MARKING) { |
| 150 return number_of_threads; | 150 return number_of_threads; |
| (...skipping 2373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2524 | 2524 |
| 2525 #ifdef DEBUG | 2525 #ifdef DEBUG |
| 2526 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2526 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 2527 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2527 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 2528 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2528 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 2529 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2529 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 2530 #undef ISOLATE_FIELD_OFFSET | 2530 #undef ISOLATE_FIELD_OFFSET |
| 2531 #endif | 2531 #endif |
| 2532 | 2532 |
| 2533 } } // namespace v8::internal | 2533 } } // namespace v8::internal |
| OLD | NEW |