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

Unified Diff: src/platform-linux.cc

Issue 13520004: [NOT FOR COMMIT] Native Client builds of V8 on ia32 and x64. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: A couple minor cleanups Created 7 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 side-by-side diff with in-line comments
Download patch
Index: src/platform-linux.cc
diff --git a/src/platform-linux.cc b/src/platform-linux.cc
index 1f9cde151c13f554a108a4b90b74573187808cdd..701843a646d8622ea68db8bb2624cdc8138fe40f 100644
--- a/src/platform-linux.cc
+++ b/src/platform-linux.cc
@@ -428,6 +428,8 @@ void OS::DebugBreak() {
# endif
#elif defined(__mips__)
asm("break");
+#elif defined(__native_client__)
+ asm("hlt");
#else
asm("int $3");
#endif
@@ -822,12 +824,16 @@ void Thread::set_name(const char* name) {
void Thread::Start() {
pthread_attr_t* attr_ptr = NULL;
+#if defined(__native_client__)
+ // use default stack size.
+#else
pthread_attr_t attr;
if (stack_size_ > 0) {
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr, static_cast<size_t>(stack_size_));
attr_ptr = &attr;
}
+#endif
int result = pthread_create(&data_->thread_, attr_ptr, ThreadEntry, this);
CHECK_EQ(0, result);
ASSERT(data_->thread_ != kNoThread);
@@ -1074,6 +1080,10 @@ static int GetThreadID() {
static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
+#if defined(__native_client__) && defined(__x86_64__)
+ // Profiling is disabled for x86_64 Native Client.
+ return;
+#else
USE(info);
if (signal != SIGPROF) return;
Isolate* isolate = Isolate::UncheckedCurrent();
@@ -1126,6 +1136,7 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
#endif // V8_HOST_ARCH_*
sampler->SampleStack(sample);
sampler->Tick(sample);
+#endif // __native_client__ && __x86_64__
}
« src/arm/simulator-arm.cc ('K') | « src/ia32/cpu-ia32.cc ('k') | src/platform-posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698