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

Side by Side Diff: test/cctest/test-platform-linux.cc

Issue 9817002: Add OS::GetCurrentProcessId and prepend output from trace-gc with the current pid (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: updates Created 8 years, 5 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/v8utils.cc ('k') | test/cctest/test-platform-win32.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 // 2 //
3 // Tests of the TokenLock class from lock.h 3 // Tests of the TokenLock class from lock.h
4 4
5 #include <pthread.h> 5 #include <pthread.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <unistd.h> // for usleep() 7 #include <unistd.h> // for usleep()
8 8
9 #include "v8.h" 9 #include "v8.h"
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 CHECK(vm->IsReserved()); 72 CHECK(vm->IsReserved());
73 void* block_addr = vm->address(); 73 void* block_addr = vm->address();
74 size_t block_size = 4 * KB; 74 size_t block_size = 4 * KB;
75 CHECK(vm->Commit(block_addr, block_size, false)); 75 CHECK(vm->Commit(block_addr, block_size, false));
76 // Check whether we can write to memory. 76 // Check whether we can write to memory.
77 int* addr = static_cast<int*>(block_addr); 77 int* addr = static_cast<int*>(block_addr);
78 addr[KB-1] = 2; 78 addr[KB-1] = 2;
79 CHECK(vm->Uncommit(block_addr, block_size)); 79 CHECK(vm->Uncommit(block_addr, block_size));
80 delete vm; 80 delete vm;
81 } 81 }
82
83 TEST(GetCurrentProcessId) {
84 OS::SetUp();
85 CHECK_EQ(static_cast<int>(getpid()), OS::GetCurrentProcessId());
86 }
OLDNEW
« no previous file with comments | « src/v8utils.cc ('k') | test/cctest/test-platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698