| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 #ifdef DEBUG | 51 #ifdef DEBUG |
| 52 bool CpuFeatures::initialized_ = false; | 52 bool CpuFeatures::initialized_ = false; |
| 53 #endif | 53 #endif |
| 54 uint64_t CpuFeatures::supported_ = 0; | 54 uint64_t CpuFeatures::supported_ = 0; |
| 55 uint64_t CpuFeatures::found_by_runtime_probing_ = 0; | 55 uint64_t CpuFeatures::found_by_runtime_probing_ = 0; |
| 56 | 56 |
| 57 | 57 |
| 58 // The Probe method needs executable memory, so it uses Heap::CreateCode. | 58 // The Probe method needs executable memory, so it uses Heap::CreateCode. |
| 59 // Allocation failure is silent and leads to safe default. | 59 // Allocation failure is silent and leads to safe default. |
| 60 void CpuFeatures::Probe() { | 60 void CpuFeatures::Probe() { |
| 61 ASSERT(!initialized_); |
| 61 ASSERT(supported_ == 0); | 62 ASSERT(supported_ == 0); |
| 62 #ifdef DEBUG | 63 #ifdef DEBUG |
| 63 initialized_ = true; | 64 initialized_ = true; |
| 64 #endif | 65 #endif |
| 65 if (Serializer::enabled()) { | 66 if (Serializer::enabled()) { |
| 66 supported_ |= OS::CpuFeaturesImpliedByPlatform(); | 67 supported_ |= OS::CpuFeaturesImpliedByPlatform(); |
| 67 return; // No features if we might serialize. | 68 return; // No features if we might serialize. |
| 68 } | 69 } |
| 69 | 70 |
| 70 const int kBufferSize = 4 * KB; | 71 const int kBufferSize = 4 * KB; |
| (...skipping 2422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2493 fprintf(coverage_log, "%s\n", file_line); | 2494 fprintf(coverage_log, "%s\n", file_line); |
| 2494 fflush(coverage_log); | 2495 fflush(coverage_log); |
| 2495 } | 2496 } |
| 2496 } | 2497 } |
| 2497 | 2498 |
| 2498 #endif | 2499 #endif |
| 2499 | 2500 |
| 2500 } } // namespace v8::internal | 2501 } } // namespace v8::internal |
| 2501 | 2502 |
| 2502 #endif // V8_TARGET_ARCH_IA32 | 2503 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |