OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 | 72 |
73 double ceiling(double x) { | 73 double ceiling(double x) { |
74 return ceil(x); | 74 return ceil(x); |
75 } | 75 } |
76 | 76 |
77 | 77 |
78 static Mutex* limit_mutex = NULL; | 78 static Mutex* limit_mutex = NULL; |
79 | 79 |
80 | 80 |
81 void OS::Setup() { | 81 void OS::SetUp() { |
82 // Seed the random number generator. We preserve microsecond resolution. | 82 // Seed the random number generator. We preserve microsecond resolution. |
83 uint64_t seed = Ticks() ^ (getpid() << 16); | 83 uint64_t seed = Ticks() ^ (getpid() << 16); |
84 srandom(static_cast<unsigned int>(seed)); | 84 srandom(static_cast<unsigned int>(seed)); |
85 limit_mutex = CreateMutex(); | 85 limit_mutex = CreateMutex(); |
86 | 86 |
87 #ifdef __arm__ | 87 #ifdef __arm__ |
88 // When running on ARM hardware check that the EABI used by V8 and | 88 // When running on ARM hardware check that the EABI used by V8 and |
89 // by the C code is the same. | 89 // by the C code is the same. |
90 bool hard_float = OS::ArmUsingHardFloat(); | 90 bool hard_float = OS::ArmUsingHardFloat(); |
91 if (hard_float) { | 91 if (hard_float) { |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 // for a zero-length string because we know that we at least read the | 505 // for a zero-length string because we know that we at least read the |
506 // '/' character. | 506 // '/' character. |
507 lib_name[strlen(lib_name) - 1] = '\0'; | 507 lib_name[strlen(lib_name) - 1] = '\0'; |
508 } else { | 508 } else { |
509 // No library name found, just record the raw address range. | 509 // No library name found, just record the raw address range. |
510 snprintf(lib_name, kLibNameLen, | 510 snprintf(lib_name, kLibNameLen, |
511 "%08" V8PRIxPTR "-%08" V8PRIxPTR, start, end); | 511 "%08" V8PRIxPTR "-%08" V8PRIxPTR, start, end); |
512 } | 512 } |
513 LOG(isolate, SharedLibraryEvent(lib_name, start, end)); | 513 LOG(isolate, SharedLibraryEvent(lib_name, start, end)); |
514 } else { | 514 } else { |
515 // Entry not describing executable data. Skip to end of line to setup | 515 // Entry not describing executable data. Skip to end of line to set up |
516 // reading the next entry. | 516 // reading the next entry. |
517 do { | 517 do { |
518 c = getc(fp); | 518 c = getc(fp); |
519 } while ((c != EOF) && (c != '\n')); | 519 } while ((c != EOF) && (c != '\n')); |
520 if (c == EOF) break; | 520 if (c == EOF) break; |
521 } | 521 } |
522 } | 522 } |
523 free(lib_name); | 523 free(lib_name); |
524 fclose(fp); | 524 fclose(fp); |
525 } | 525 } |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1208 | 1208 |
1209 | 1209 |
1210 void Sampler::Stop() { | 1210 void Sampler::Stop() { |
1211 ASSERT(IsActive()); | 1211 ASSERT(IsActive()); |
1212 SignalSender::RemoveActiveSampler(this); | 1212 SignalSender::RemoveActiveSampler(this); |
1213 SetActive(false); | 1213 SetActive(false); |
1214 } | 1214 } |
1215 | 1215 |
1216 | 1216 |
1217 } } // namespace v8::internal | 1217 } } // namespace v8::internal |
OLD | NEW |