| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // set to all ones. The seed will be identical for different instances that | 85 // set to all ones. The seed will be identical for different instances that |
| 86 // call this setup code within the same millisecond. | 86 // call this setup code within the same millisecond. |
| 87 uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis()); | 87 uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis()); |
| 88 srandom(static_cast<unsigned int>(seed)); | 88 srandom(static_cast<unsigned int>(seed)); |
| 89 limit_mutex = CreateMutex(); | 89 limit_mutex = CreateMutex(); |
| 90 } | 90 } |
| 91 | 91 |
| 92 | 92 |
| 93 uint64_t OS::CpuFeaturesImpliedByPlatform() { | 93 uint64_t OS::CpuFeaturesImpliedByPlatform() { |
| 94 #if (defined(__VFP_FP__) && !defined(__SOFTFP__)) | 94 #if (defined(__VFP_FP__) && !defined(__SOFTFP__)) |
| 95 // Here gcc is telling us that we are on an ARM and gcc is assuming that we | 95 // Here gcc is telling us that we are on an ARM and gcc is assuming |
| 96 // have VFP3 instructions. If gcc can assume it then so can we. | 96 // that we have VFP3 instructions. If gcc can assume it then so can |
| 97 return 1u << VFP3; | 97 // we. VFPv3 implies ARMv7, see ARM DDI 0406B, page A1-6. |
| 98 return 1u << VFP3 | 1u << ARMv7; |
| 98 #elif CAN_USE_ARMV7_INSTRUCTIONS | 99 #elif CAN_USE_ARMV7_INSTRUCTIONS |
| 99 return 1u << ARMv7; | 100 return 1u << ARMv7; |
| 100 #elif(defined(__mips_hard_float) && __mips_hard_float != 0) | 101 #elif(defined(__mips_hard_float) && __mips_hard_float != 0) |
| 101 // Here gcc is telling us that we are on an MIPS and gcc is assuming that we | 102 // Here gcc is telling us that we are on an MIPS and gcc is assuming that we |
| 102 // have FPU instructions. If gcc can assume it then so can we. | 103 // have FPU instructions. If gcc can assume it then so can we. |
| 103 return 1u << FPU; | 104 return 1u << FPU; |
| 104 #else | 105 #else |
| 105 return 0; // Linux runs on anything. | 106 return 0; // Linux runs on anything. |
| 106 #endif | 107 #endif |
| 107 } | 108 } |
| (...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1111 | 1112 |
| 1112 void Sampler::Stop() { | 1113 void Sampler::Stop() { |
| 1113 ASSERT(IsActive()); | 1114 ASSERT(IsActive()); |
| 1114 SignalSender::RemoveActiveSampler(this); | 1115 SignalSender::RemoveActiveSampler(this); |
| 1115 SetActive(false); | 1116 SetActive(false); |
| 1116 } | 1117 } |
| 1117 | 1118 |
| 1118 #endif // ENABLE_LOGGING_AND_PROFILING | 1119 #endif // ENABLE_LOGGING_AND_PROFILING |
| 1119 | 1120 |
| 1120 } } // namespace v8::internal | 1121 } } // namespace v8::internal |
| OLD | NEW |