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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 class PreallocatedMemoryThread: public Thread { | 112 class PreallocatedMemoryThread: public Thread { |
113 public: | 113 public: |
114 PreallocatedMemoryThread() : keep_running_(true) { | 114 PreallocatedMemoryThread() : keep_running_(true) { |
115 wait_for_ever_semaphore_ = OS::CreateSemaphore(0); | 115 wait_for_ever_semaphore_ = OS::CreateSemaphore(0); |
116 data_ready_semaphore_ = OS::CreateSemaphore(0); | 116 data_ready_semaphore_ = OS::CreateSemaphore(0); |
117 } | 117 } |
118 | 118 |
119 // When the thread starts running it will allocate a fixed number of bytes | 119 // When the thread starts running it will allocate a fixed number of bytes |
120 // on the stack and publish the location of this memory for others to use. | 120 // on the stack and publish the location of this memory for others to use. |
121 void Run() { | 121 void Run() { |
122 EmbeddedVector<char, 16 * 1024> local_buffer; | 122 EmbeddedVector<char, 32 * 1024> local_buffer; |
123 | 123 |
124 // Initialize the buffer with a known good value. | 124 // Initialize the buffer with a known good value. |
125 OS::StrNCpy(local_buffer, "Trace data was not generated.\n", | 125 OS::StrNCpy(local_buffer, "Trace data was not generated.\n", |
126 local_buffer.length()); | 126 local_buffer.length()); |
127 | 127 |
128 // Publish the local buffer and signal its availability. | 128 // Publish the local buffer and signal its availability. |
129 data_ = &local_buffer[0]; | 129 data_ = &local_buffer[0]; |
130 length_ = sizeof(local_buffer); | 130 length_ = sizeof(local_buffer); |
131 data_ready_semaphore_->Signal(); | 131 data_ready_semaphore_->Signal(); |
132 | 132 |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 Top::break_access_->Lock(); | 882 Top::break_access_->Lock(); |
883 } | 883 } |
884 | 884 |
885 | 885 |
886 ExecutionAccess::~ExecutionAccess() { | 886 ExecutionAccess::~ExecutionAccess() { |
887 Top::break_access_->Unlock(); | 887 Top::break_access_->Unlock(); |
888 } | 888 } |
889 | 889 |
890 | 890 |
891 } } // namespace v8::internal | 891 } } // namespace v8::internal |
OLD | NEW |