Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(840)

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

Issue 6696042: Adding 'isolates' argument to LOG to get rid of multiple TLS fetches in profiling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/isolates
Patch Set: Addressing code review feedback + rebase Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/platform-cygwin.cc ('k') | src/platform-linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 150
151 void* OS::Allocate(const size_t requested, 151 void* OS::Allocate(const size_t requested,
152 size_t* allocated, 152 size_t* allocated,
153 bool executable) { 153 bool executable) {
154 const size_t msize = RoundUp(requested, getpagesize()); 154 const size_t msize = RoundUp(requested, getpagesize());
155 int prot = PROT_READ | PROT_WRITE | (executable ? PROT_EXEC : 0); 155 int prot = PROT_READ | PROT_WRITE | (executable ? PROT_EXEC : 0);
156 void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0); 156 void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0);
157 157
158 if (mbase == MAP_FAILED) { 158 if (mbase == MAP_FAILED) {
159 LOG(StringEvent("OS::Allocate", "mmap failed")); 159 LOG(ISOLATE, StringEvent("OS::Allocate", "mmap failed"));
160 return NULL; 160 return NULL;
161 } 161 }
162 *allocated = msize; 162 *allocated = msize;
163 UpdateAllocatedSpaceLimits(mbase, msize); 163 UpdateAllocatedSpaceLimits(mbase, msize);
164 return mbase; 164 return mbase;
165 } 165 }
166 166
167 167
168 void OS::Free(void* buf, const size_t length) { 168 void OS::Free(void* buf, const size_t length) {
169 // TODO(1240712): munmap has a return value which is ignored here. 169 // TODO(1240712): munmap has a return value which is ignored here.
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 if (data_->signal_sender_launched_) { 782 if (data_->signal_sender_launched_) {
783 Top::WakeUpRuntimeProfilerThreadBeforeShutdown(); 783 Top::WakeUpRuntimeProfilerThreadBeforeShutdown();
784 pthread_join(data_->signal_sender_thread_, NULL); 784 pthread_join(data_->signal_sender_thread_, NULL);
785 data_->signal_sender_launched_ = false; 785 data_->signal_sender_launched_ = false;
786 } 786 }
787 } 787 }
788 788
789 #endif // ENABLE_LOGGING_AND_PROFILING 789 #endif // ENABLE_LOGGING_AND_PROFILING
790 790
791 } } // namespace v8::internal 791 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-cygwin.cc ('k') | src/platform-linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698