Commit Graph

59 Commits

Author SHA1 Message Date
erik.corry@gmail.com
0d94d7c785 Add vfp support on ARM. Patch from John Jozwiak.
Review URL: http://codereview.chromium.org/348019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-12 13:04:02 +00:00
ager@chromium.org
e5095880cb Add MAP_FIXED to Uncommit calls to see if that has an effect on GMail
memory usage in Chromium 64-bit Linux.

Review URL: http://codereview.chromium.org/200055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-09 07:51:51 +00:00
mikhail.naganov@gmail.com
65dcf75c2c Linux profiler: check whether signal handler is called in the VM thread.
I have several Chromium's core files having SIGPROF signal handler called in the context of an arbitrary thread, causing a crash. This change introduces checking of current thread in the signal handler.

Review URL: http://codereview.chromium.org/171115

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-04 11:16:51 +00:00
iposva@chromium.org
3d070f1f0c - Fix a style violation which was flagged by gcc: while loop without body
- Restructured the entire function because:
  During the simple style fix I discovered that this whole routine was
  hard to read due to a general lack of comments. While adding comments I
  realized that the function was also skipping entries if there were two
  consecutive entries in the maps file.

Review URL: http://codereview.chromium.org/159659

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-01 06:11:53 +00:00
iposva@chromium.org
8a82d61722 - getc returns an int.
Review URL: http://codereview.chromium.org/159538

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 21:10:13 +00:00
mikhail.naganov@gmail.com
ee340a52ff X64: Fixes to enable C/C++ functions processing in profiler.
- rewrote Linux version of LogSharedLibraryAddresses to work correctly with 64-bit libs;
 - fixed address length restriction in JS tickprofiler script.

Review URL: http://codereview.chromium.org/160273


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 15:37:05 +00:00
mikhail.naganov@gmail.com
8318f5e5f1 Reimplement profiler sampler on Mac OS X to get it working under Chromium.
Previous implementation of sampler for OS X was copied from the Linux one. But BSD (OS X) and Linux has a very important difference in signal handling. LinuxThreads doesn't support the notion of process-directed signals. So, the SIGPROF signal was directed to the thread that installed the handler---the V8 thread. But on BSD, signal handling is implemented according to POSIX spec, where process-directed signal is to be handled by an arbitrary selected thread. By a coincidence, in V8's sample shell and in Chromium's test shell, V8's thread was picked almost every time, so sampling seemed working. But not in case of Chromium.

So, I've changed the implementation of profiler sampler to use the same scheme as on Windows---a dedicated thread with high priority is used to periodically pause and sample V8's thread.

Review URL: http://codereview.chromium.org/147150

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 08:46:59 +00:00
erik.corry@gmail.com
52dfeca5f2 Fix profiling for shared libraries on Linux loaded at negative addresses
(Android does this).  Fix logging for executable mappings that have no
file associated.  Be more consistent with use of uintptr_t.
Review URL: http://codereview.chromium.org/125183

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-16 12:52:02 +00:00
kasperl@chromium.org
be11c4e979 Patch by Craig Schlenter. See http://codereview.chromium.org/118153
Change stack alignment on linux to 16 bytes to keep gcc 4.4 happy. 
This fixes the mksnapshot segfault without requiring -fno-tree-vectorize
which just avoided the problem by not generating code with movdqa.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-05 06:20:30 +00:00
mikhail.naganov@gmail.com
30a0a7de43 Split nested namespaces declaration in two lines in accordance with C++ Style Guide.
This issue was raised by Brett Wilson while reviewing my changelist for readability. Craig Silverstein (one of C++ SG maintainers) confirmed that we should declare one namespace per line. Our way of namespaces closing seems not violating style guides (there is no clear agreement on it), so I left it intact.

Review URL: http://codereview.chromium.org/115756


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 10:05:56 +00:00
deanm@chromium.org
4cd00fbc64 Adjust for differences in the arm signal structures between glibc versions.
Review URL: http://codereview.chromium.org/113332


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-13 13:44:25 +00:00
erik.corry@gmail.com
79fbaf7962 Fix fp problems in runtime code on ARM EABI by 8-byte aligning
the stack on exit to C.
Review URL: http://codereview.chromium.org/115256

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-12 20:11:01 +00:00
lrn@chromium.org
883b2826b9 X64: Changed TickSample to hold pointer-sized values for registers.
Review URL: http://codereview.chromium.org/113094


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-07 09:34:16 +00:00
deanm@chromium.org
0f64915781 Use the correct V8_HOST_ARCH macro, it is IA32 and not X86.
Review URL: http://codereview.chromium.org/115022


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-06 11:40:44 +00:00
deanm@chromium.org
5f4322f77f Have the profiler load the correct registers on x64.
This is still not correct, since internally they are kept as an int.
Use our new V8_HOST_ARCH macros for detecting the host processor.

Review URL: http://codereview.chromium.org/109025


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-06 11:19:50 +00:00
lrn@chromium.org
ea56336518 Create build structure for X64.
Possible to attempt to build for X64.
Build will be unsuccessful, since all x64 source files are
missing and pointers are reinterpreted as integers everywhere.

Review URL: http://codereview.chromium.org/99186


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 13:11:48 +00:00
erik.corry@gmail.com
413bd7a91c Lint.
Review URL: http://codereview.chromium.org/77026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 13:57:15 +00:00
erik.corry@gmail.com
8f911a2f5d * Remove unused code from codegen-arm.cc
* Fix fp ops on pre-EABI ARM targets.
* Fix missing TIMEVAL_TO_TIMESPEC on Android.
Review URL: http://codereview.chromium.org/77025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 13:27:36 +00:00
iposva@chromium.org
7dece760ad - Fix delta time calculation in LinuxSemaphore::Wait.
Review URL: http://codereview.chromium.org/69024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-17 00:56:52 +00:00
iposva@chromium.org
e05c2e3693 Start addressing massive arrays on the stack. There is hardly ever
a reason to stack allocate large chunks of stack space.
- Runtime_GetCFrames used to allocate a frame size of 52040 bytes.
- PreallocatedMemoryThread::Run used to allocate 32784 bytes.
- Fixed StringStream overflow conditions.

Review URL: http://codereview.chromium.org/67197

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1729 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-16 21:01:05 +00:00
erik.corry@gmail.com
59d3cf8403 Fix profiling on Android.
Review URL: http://codereview.chromium.org/62102

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-07 13:33:39 +00:00
sgjesse@chromium.org
8e34544bd1 Moved stdio and string functions to POSIX platform file.
Review URL: http://codereview.chromium.org/45063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 08:38:02 +00:00
christian.plesner.hansen@gmail.com
9142c42df2 Fixed a bunch of memory leaks in tests, including:
- String traversal test data (now in a zone)
 - Debug message thread (now joined on exit)
 - Threading test threads (now joined on exit)
 - Changed message tests framework to cope with valgrind
Also, fixed a bug where we'd try to delete stack-allocated objects
when tearing down v8.  Good times.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 00:24:49 +00:00
sgjesse@chromium.org
0e5999efae Move time related functions to POSIX platform file.
The functions getrusage, gettimeofday and localtime are in POSIX.1-2001.
Review URL: http://codereview.chromium.org/53045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-26 09:28:27 +00:00
kmillikin@chromium.org
89a43b8f18 Fix ARM simulator. Unless building for the actual ARM hardware,
inline assembler in C++ code should be IA32 assembly, not ARM.

TBR=erik.corry@gmail.com

Review URL: http://codereview.chromium.org/53011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 13:21:34 +00:00
kmillikin@chromium.org
bc3fb11881 Add basic infrastructure for protecting V8's heap when leaving the VM
and unprotecting it when (re)entering.  The functionality is enabled
by the flag --protect-heap and requires V8 to be built with
ENABLE_HEAP_PROTECTION and ENABLE_LOGGING_AND_PROFILING defined.

Implemented on Linux and Windows but not yet for other platforms.

Review URL: http://codereview.chromium.org/53004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 12:47:53 +00:00
sgjesse@chromium.org
96088babe7 Add a new "pseudo" platform for POSIX. It it will contain code shared by the platforms supporting POSIX. Currently Linux, Mac OS and FreeBSD are considered POSIX platforms using the POSIX implementation.
Initially the platform socket implementation has been moved from the Linux, Mac OS and FreeBSD platforms to the POSIX platform.

If implementation which ends up in the POSIX platform at some point cannot be the same across POSIX platforms the implementation can easily be moved back into the individual POSIX "complient" platforms.
Review URL: http://codereview.chromium.org/51001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1583 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-24 06:32:00 +00:00
erik.corry@gmail.com
aa81281b3d Reapply portability fixes, this time without 64 bit system bug.
Review URL: http://codereview.chromium.org/52010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 12:37:53 +00:00
erik.corry@gmail.com
80ce1b2500 Reverse latest build tweaks since they fail on some 64 bit systems
TBR=ager

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1567 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 17:01:15 +00:00
erik.corry@gmail.com
77b963ca04 More compatibility changes.
Review URL: http://codereview.chromium.org/47004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 16:37:18 +00:00
sgjesse@chromium.org
83111deb97 Add support for setting the SO_REUSEADDR option for sockets.
Review URL: http://codereview.chromium.org/50036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1557 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-20 08:53:57 +00:00
sgjesse@chromium.org
881e01b245 Change the socket close to shutdown.
Removed the close method for socket and added shutdown instead. The shutdown method is the one to use when terminating socket communication. The close call is in the destructor.
Review URL: http://codereview.chromium.org/42387

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 11:55:09 +00:00
erik.corry@gmail.com
2d4dd93bdd Misc. portability fixes.
Review URL: http://codereview.chromium.org/42337

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 15:20:26 +00:00
sgjesse@chromium.org
b6640ad0b5 Fixed memory leaks in socket implementation.
Fixed memory leaks reported by valgring in the socket implementation and socket tests.

BUG=276
Review URL: http://codereview.chromium.org/42331

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1536 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 13:32:22 +00:00
sgjesse@chromium.org
b226f1242e Add a close method to sockets.
Now the destructor is not the only way of closing a socket, which was a bit to limited.
Review URL: http://codereview.chromium.org/42330

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 13:11:43 +00:00
olehougaard
74ebdf896c Getting rid of OS::StrDup and OS::StrNDup which were sometimes misused.
Review URL: http://codereview.chromium.org/42329

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1534 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 12:50:13 +00:00
sgjesse@chromium.org
75bfe56832 Circumvent a bug in older glibc.
In glibc prior to 2.3.4 the return value from sem_timedwait is not -1
when it fails, but the actual error code.

Turned out that our ARM setup uses glibc 2.3.2.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 10:48:06 +00:00
sgjesse@chromium.org
d7f9992442 Added a wait with timeout to the platform semaphore class.
The code has been compiled and tested on Windows, Linux and Mac OS.

The FreeBSD version is a copy of the Linux version which should work on FreeBSD as well. According to the FreeBSD documentation clock_gettime is part of the standard C library so the assumption is that no additional link libraries is required for FreeBSD.
Review URL: http://codereview.chromium.org/48123

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-18 09:04:24 +00:00
erik.corry@gmail.com
60d83a789b 8-byte align C stack on Linux and Windows.
Review URL: http://codereview.chromium.org/42116

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1496 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-12 10:20:32 +00:00
sgjesse@chromium.org
f87d1530e6 The SendAll method on Socket was a helper method that did not really belong in platform.
Review URL: http://codereview.chromium.org/40104

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-04 10:33:00 +00:00
sgjesse@chromium.org
ad7ad5cfe0 Fixed lint errors.
The previous commit (r1349) resulted in a number of lint errors - extra whitespace and a missing explicit on a constructor in the test. These has been fixed.

TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/27089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 14:22:42 +00:00
sgjesse@chromium.org
be059966c1 Add socket support to platform code.
The new Socket class is an encapsulation of the standard BSD socket API. As it depends on platform specific include files and have some slight platform variations it is part of the platform code.

On Mac OS only the option SO_REUSEADDR is set to true for server sockets. Running the test required it as the bound listener socket would sometimes end up in TIME_WAIT. On Windows and Linux this has never been observed (given the client end of the socket is closed before the server end).

The code has been tested on Windows, Linux and Mac OS. The FreeBSD version is a copy of the Linux version but has not been compiled nor tested.

Missing Xcode project updates.
Review URL: http://codereview.chromium.org/27085

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1349 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-24 13:32:01 +00:00
sgjesse@chromium.org
563287b02f Introduced a platform independent version of strchr, as the return value is const on Windows.
This fixes building of D8 on Windows.

Mac OS and FreeBSD changes have not been tested.
Review URL: http://codereview.chromium.org/20534

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-20 11:31:44 +00:00
mikhail.naganov@gmail.com
a23fd3284a Added the simplest call stack sampling and call profile in tick processor output.
Currently only two stack frames are sampled (current function and its caller).

Output of tick processor looks like this:

 [Call profile]:
   total  call path
   15.2%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: montReduce crypto.js:583
    6.5%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: bnpSquareTo crypto.js:431
    2.9%  Builtin: KeyedStoreIC_Generic  <-  LazyCompile: montReduce crypto.js:583
    2.3%  LazyCompile: am3 crypto.js:108  <-  LazyCompile: bnpMultiplyTo crypto.js:415

Tested under Windows, Linux and OS X.

Review URL: http://codereview.chromium.org/21403


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-17 14:45:45 +00:00
christian.plesner.hansen@gmail.com
f56c10598b Made d8 console=readline work on leopard.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-03 15:51:16 +00:00
ager@chromium.org
ced1493d01 Remove use of strtoll in favor of strtol which should be supported on
more platforms.
Review URL: http://codereview.chromium.org/11607

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-21 08:36:30 +00:00
iposva@chromium.org
3fc91f93a9 Remove OS::WcsCpy from platform.h. This function is unused
and is giving us headaches on platforms not supporting wchar_t.

Review URL: http://codereview.chromium.org/11546

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-20 23:16:26 +00:00
kasperl@chromium.org
88c9fa5d42 Allow platforms (linux and win32) to not force 16-byte alignment
of activation frames (needed on Mac OS X).
Review URL: http://codereview.chromium.org/4211

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-23 10:06:58 +00:00
erik.corry@gmail.com
a9e4a68ef2 Parse /proc/self/maps lines better to handle variations between Linux kernels.
It seems noone has had time to file a bug on this.
Review URL: http://codereview.chromium.org/4210

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-23 08:56:12 +00:00
christian.plesner.hansen@gmail.com
32cf7fd9a1 Replaced calls to functions that msvc consider deprecated. Used
Vector<...> in more places to be sure that buffers have a length
associated with them.

Review URL: http://codereview.chromium.org/1940

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-11 14:34:48 +00:00