Chromium Code Reviews

Side by Side Diff: src/platform-openbsd.cc

Issue 9873023: Fix performance regressions due to lazy initialization. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add OS::PostSetUp(). Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
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 89 matching lines...)
100 100
101 101
102 void OS::SetUp() { 102 void OS::SetUp() {
103 // Seed the random number generator. We preserve microsecond resolution. 103 // Seed the random number generator. We preserve microsecond resolution.
104 uint64_t seed = Ticks() ^ (getpid() << 16); 104 uint64_t seed = Ticks() ^ (getpid() << 16);
105 srandom(static_cast<unsigned int>(seed)); 105 srandom(static_cast<unsigned int>(seed));
106 limit_mutex = CreateMutex(); 106 limit_mutex = CreateMutex();
107 } 107 }
108 108
109 109
110 void MathSetup(); // Defined in platform-posix.cc.
111
112 void OS::PostSetUp() {
113 // Math functions depend on CPU features therefore they are initialized after
114 // CPU.
115 MathSetup();
116 }
117
118
110 uint64_t OS::CpuFeaturesImpliedByPlatform() { 119 uint64_t OS::CpuFeaturesImpliedByPlatform() {
111 return 0; 120 return 0;
112 } 121 }
113 122
114 123
115 int OS::ActivationFrameAlignment() { 124 int OS::ActivationFrameAlignment() {
116 // With gcc 4.4 the tree vectorization optimizer can generate code 125 // With gcc 4.4 the tree vectorization optimizer can generate code
117 // that requires 16 byte alignment such as movdqa on x86. 126 // that requires 16 byte alignment such as movdqa on x86.
118 return 16; 127 return 16;
119 } 128 }
(...skipping 839 matching lines...)
959 968
960 969
961 void Sampler::Stop() { 970 void Sampler::Stop() {
962 ASSERT(IsActive()); 971 ASSERT(IsActive());
963 SignalSender::RemoveActiveSampler(this); 972 SignalSender::RemoveActiveSampler(this);
964 SetActive(false); 973 SetActive(false);
965 } 974 }
966 975
967 976
968 } } // namespace v8::internal 977 } } // namespace v8::internal
OLDNEW
« src/platform-cygwin.cc ('K') | « src/platform-nullos.cc ('k') | src/platform-posix.cc » ('j') | no next file with comments »

Powered by Google App Engine