Commit Graph

88 Commits

Author SHA1 Message Date
bmeurer@chromium.org
adab11d0f9 Revert "Cross-compiling from Linux to Android requires -lrt for the host toolset.", "Fix Visual Studio debug build after r16398." and "Reland "Add Chromium-style TimeDelta, Time and TimeTicks classes, and a new ElapsedTimer class.""
This reverts commit r16398, r16399 and r16402 for breaking the Windows
WebKit tests. Will reland fix which doesn't use High Resolution Timer
for ElapsedTimer (we suspect QueryPerformanceCounter overhead is
responsible for test breakage).

TBR=machenbach@chromium.org

Review URL: https://codereview.chromium.org/23710002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-28 14:32:08 +00:00
bmeurer@chromium.org
e2b4525397 Reland "Add Chromium-style TimeDelta, Time and TimeTicks classes, and a new ElapsedTimer class."
These classes are meant to replace OS::Ticks() and OS::TimeCurrentMillis(),
which are broken in several ways. The ElapsedTimer class implements a
stopwatch using TimeTicks::HighResNow() for high resolution, monotonic
timing.

Also fix the CpuProfile::GetStartTime() and CpuProfile::GetEndTime()
methods to actually return the time relative to the unix epoch as stated
in the documentation (previously that was relative to some arbitrary
point in time, i.e. boot time).

BUG=v8:2853
R=machenbach@chromium.org

Review URL: https://codereview.chromium.org/23469013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-28 13:03:06 +00:00
bmeurer@chromium.org
1d3f6815e3 Revert "Add Chromium-style TimeDelta, Time and TimeTicks classes, and a new ElapsedTimer class."
This reverts commit r16390 for breaking the Windows build. Will
reland fixed version, which also uses the platform/ folder instead
of time/ folder as per offline discussion.

TBR=machenbach@chromium.org

Review URL: https://codereview.chromium.org/23690003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-28 11:38:20 +00:00
bmeurer@chromium.org
fa5216a145 Add Chromium-style TimeDelta, Time and TimeTicks classes, and a new ElapsedTimer class.
These classes are meant to replace OS::Ticks() and OS::TimeCurrentMillis(),
which are broken in several ways. The ElapsedTimer class implements a
stopwatch using TimeTicks::HighResNow() for high resolution, monotonic
timing.

Also fix the CpuProfile::GetStartTime() and CpuProfile::GetEndTime()
methods to actually return the time relative to the unix epoch as stated
in the documentation (previously that was relative to some arbitrary
point in time, i.e. boot time).

BUG=v8:2853
R=machenbach@chromium.org, yurys@chromium.org

Committed: https://code.google.com/p/v8/source/detail?r=16388

Review URL: https://codereview.chromium.org/23295034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-28 11:06:11 +00:00
bmeurer@chromium.org
cfb126c52a Revert "Add Chromium-style TimeDelta, Time and TimeTicks classes, and a new ElapsedTimer class."
This reverts commit r16388 for breaking build due to merge typo,
will reland with typo fixed.

TBR=machenbach@chromium.org

Review URL: https://codereview.chromium.org/23698002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-28 11:04:40 +00:00
bmeurer@chromium.org
8faf4d4291 Add Chromium-style TimeDelta, Time and TimeTicks classes, and a new ElapsedTimer class.
These classes are meant to replace OS::Ticks() and OS::TimeCurrentMillis(),
which are broken in several ways. The ElapsedTimer class implements a
stopwatch using TimeTicks::HighResNow() for high resolution, monotonic
timing.

Also fix the CpuProfile::GetStartTime() and CpuProfile::GetEndTime()
methods to actually return the time relative to the unix epoch as stated
in the documentation (previously that was relative to some arbitrary
point in time, i.e. boot time).

BUG=v8:2853
R=machenbach@chromium.org, yurys@chromium.org

Review URL: https://codereview.chromium.org/23295034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-28 10:59:07 +00:00
bmeurer@chromium.org
e9fcf8fc98 Revert the latest set of platform changes.
Revert "Fix NaCl build."
Revert "Revert target arch detection."
Revert "Fix typo."
Revert "Simplify implementation of Mutex."
Revert "Fix for older clang releases that lack __has_extension."
Revert "Reland initial bits of "Implement correct OS and CC detection.""

TBR=danno@chromium.org,svenpanne@chromium.org

Review URL: https://codereview.chromium.org/21095008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 07:51:46 +00:00
bmeurer@chromium.org
64bfd42a4c Simplify implementation of Mutex.
Also moves Mutex to its own file mutex.{cc,h}.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/21087012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 17:12:49 +00:00
bmeurer@chromium.org
69fe1ff281 Don't duplicate OS::ActivationFrameAlignment() for every POSIX platform.
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/20283002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-25 09:49:28 +00:00
bmeurer@chromium.org
0da0309128 Drop redundant GetRandomMmapAddr() in platform-openbsd.cc.
TBR=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/20284002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-25 09:28:21 +00:00
bmeurer@chromium.org
401af139b5 Don't duplicate OS::CpuFeaturesImpliedByPlatform for every POSIX platform.
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/20179004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-25 09:16:39 +00:00
bmeurer@chromium.org
e1b36b3b6b Don't duplicate ceiling() for every POSIX platform.
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/20274002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-25 08:49:52 +00:00
bmeurer@chromium.org
71c563f8e3 Drop leftover unused kNoThread in platform-openbsd.cc.
TBR=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/20256003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-25 08:04:45 +00:00
bmeurer@chromium.org
cb055f1732 Avoid duplication of OS::Thread methods for every POSIX platform.
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/19490010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-23 13:47:50 +00:00
bmeurer@chromium.org
558c42373d Fix duplicated methods for POSIX platforms.
No need to duplicate OS::NumberOfCores() for every POSIX platform.
No need to duplicate OS::Sleep() for every POSIX platform.
No need to duplicate OS::Abort() and OS::DebugBreak() for every POSIX platform.
No need to duplicate OS::Free() for every POSIX platform.
Move #ifdef'd OS::ProtectCode() and OS::Guard() to platform-posix.cc.
No need to duplicate OS::AllocateAlignment() for every POSIX platform.
No need to duplicate OS::PostSetUp() for every POSIX platform.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/20014005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-23 09:59:14 +00:00
bmeurer@chromium.org
e3676e9135 Cleanup common POSIX functionality.
The Mutex implementation is the same for all 6 POSIX platformats, just
like of them use the sched_yield() to implement Thread::YieldCPU().

R=dslomov@chromium.org

Review URL: https://codereview.chromium.org/18335008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-11 11:37:08 +00:00
yangguo@chromium.org
02674ee414 Keep two empty lines between declarations for cpp files
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/18509003

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-05 09:52:11 +00:00
jkummerow@chromium.org
c7a9bffbcf Clean up the usage of V8_TARGET_ARCH_${arch} and V8_HOST_ARCH_${arch}
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/18037002

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-28 15:34:48 +00:00
yurys@chromium.org
07ae09c124 Nuke OS::ReleaseStore, use Release_Store instead
The operation is already implemented in atomicops.h No need to duplicate the code.

BUG=None
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/17222004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-20 06:16:24 +00:00
plind44@gmail.com
4ee5e29b94 Prevent segfault if file cannot be opened when --ll_prof is used.
TEST=

BUG=
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/16107002

Patch from Dusan Milosavljevic <Dusan.Milosavljevic@rt-rk.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14889 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-29 19:45:19 +00:00
danno@chromium.org
bc04544f02 Replace math.h with cmath
This will make it easier to use other STL headers in the future

Review URL: https://codereview.chromium.org/14362023

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 13:26:47 +00:00
yurys@chromium.org
1596afa7f9 Move *BSD and Solaris Sampler implementation into sampler.cc
This is a first step to having profiler sampler implementation in one file with platform capabilities guarded with #ifdef. Otherwise we have very similar implementations scattered over platform-*.cc files which makes it hard to see differences and make changes.

The next steps will be to merge win32, Mac OS X and Cygwin implementations into sampler.cc They suspend profiled thread instead of sending a signal but apart from that the logic is pretty much the same. Then I'm going to move sampler-related code from log.* into sampler.*

BUG=None

Review URL: https://codereview.chromium.org/13852005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-15 13:57:41 +00:00
svenpanne@chromium.org
79a13e63c0 Unified the structure of VirtualMemory implementations across platforms a bit.
This is just shuffling some code around to make comparing the platform files easier.

Made cygwin/nullos support a bit more complete on the way.

Review URL: https://codereview.chromium.org/14162004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-12 11:10:19 +00:00
yurys@chromium.org
719fe8c310 Fix cctest/test-cpu-profiler/CollectCpuProfile test on Arm and MIPS simulators
Signal handler on simulator now retrieve registers from the simulator not from the host machine.

BUG=v8:2621

Review URL: https://codereview.chromium.org/13845014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14235 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-11 14:22:04 +00:00
yurys@chromium.org
46508ec2c2 Remove profiler thread related methods from RuntimeProfiler
Now that V8 doesn't use sampling thread for optimizations
the methods can be removed.

BUG=None

Review URL: https://codereview.chromium.org/14057003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-10 14:41:43 +00:00
yurys@chromium.org
c7ce87f865 Add sanity test for CPU profiler
The new test checks full CPU profiling cycle: using public
V8 API it starts profiling, executes a script, stops profiling
and analyzes collected profile to check that its top-down
tree has expected strutcture. The script that is being profiled
is guaranteed to run > 200ms to make sure enough samples
are collected.

To avoid possible flakiness due to non-deterministic time required
to start new thread on varios OSs when Sampler and ProfilerEventsProcessor
threads are being started the main thread is blocked until the threads
are running.

Also I removed the heuristic in profile-generator.cc where we try
to figure out if the value on top of the sampled stack is return address
of some frameless stub invocation. The code periodically gives false positive
with the new test ending up in an extra node in the collected cpu profile.
After discussion with jkummerow@ we concluded that the logic is too fragile
and that we can address frameless stub invocations in a more reliable way
later should they have a noticeable effect on cpu profiling.

BUG=None

Review URL: https://codereview.chromium.org/13627002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14205 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-10 09:47:44 +00:00
yurys@chromium.org
9cbb34a0b5 Isolatify CPU profiler
Relanding r13987 that was reverted in r14031

TBR=danno
BUG=None

Review URL: https://codereview.chromium.org/13457002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-02 07:53:50 +00:00
danno@chromium.org
ed3809c318 Maintain API compatibility with older versions of V8.
Revert "Allow recording individual samples in addition to the aggregated CPU profiles"
Revert "Isolatify CPU profiler"
Revert "Isolatify HeapProfiler"
Revert "Deprecate HeapSnapshot type"
Revert "Isolatify CPU profiler public API"
Revert "MSVS compilation fix after r14006"
Revert "Add methods to allow resuming execution after calling TerminateExecution()."

R=jkummerow@chromium.org,mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/12475016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-21 14:42:17 +00:00
yurys@chromium.org
a8e9bebabd Isolatify CPU profiler
BUG=None

Review URL: https://codereview.chromium.org/12706020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-19 12:44:10 +00:00
yurys@chromium.org
250edbdc64 Revert "Send SIGPROF signals on the profiler event processor thread"
This reverts commit r13735 as CPU profiler data is inaccurate after that change.

BUG=v8:2571

Review URL: https://codereview.chromium.org/12592002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13851 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-07 09:12:48 +00:00
yurys@chromium.org
dc9b817667 Send SIGPROF signals on the profiler event processor thread
The patch is based on the previous one that was rolled out: https://code.google.com/p/v8/source/detail?r=12985

On Linux sampling for CPU profiler is initiated on the profiler event processor thread, other platforms to follow.

CPU profiler continues to use SamplingCircularQueue, we will replave it with a single sample buffer when Mac and Win ports support profiling on the event processing thread.

When --prof option is specified profiling is initiated either on the profiler event processor thread if CPU profiler is on or on the  SignalSender thread as it used to if no CPU profiles are being collected.

ProfilerEventsProcessor::ProcessEventsAndDoSample now waits in a tight loop, processing collected samples until sampling interval expires. To save CPU resources I'm planning to change that to use nanosleep as only one sample is expected in the queue at any point.

BUG=v8:2364

Review URL: https://codereview.chromium.org/12321046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-26 16:15:32 +00:00
hpayer@chromium.org
c1eabf2523 Determine number of available cores on all platforms.
BUG=

Review URL: https://codereview.chromium.org/12089107

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-15 12:38:59 +00:00
rossberg@chromium.org
9fc844b760 V8_Fatal now prints C++ stack trace in debug mode.
Currently only supported on Linux. When compiled with GCC, also demangles C++ identifier names.

Should make debugging those flaky crashes on buildbots easier... :)

R=mstarzinger@chromium.org,ulan@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11577019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-14 14:27:06 +00:00
svenpanne@chromium.org
23d681c50b Removed RuntimeProfilerRateLimiter class and RuntimeProfiler::IsSomeIsolateInJS.
Removing the former was basically a consequence of removing the latter. The net
effect is, apart from less code, that the signal sender thread is much more
explicit about its logic now.

Review URL: https://codereview.chromium.org/11543020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-12 15:26:04 +00:00
svenpanne@chromium.org
17def81fc9 Use count-based profiling exclusively.
Review URL: https://codereview.chromium.org/11437016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-07 08:55:06 +00:00
jkummerow@chromium.org
bd69d3d5c3 Revert "Perform CPU sampling by CPU sampling thread only iff processing thread is not running."
This reverts r12985.

Review URL: https://codereview.chromium.org/11428103

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-30 10:26:21 +00:00
jkummerow@chromium.org
7f824867f6 Perform CPU sampling by CPU sampling thread only iff processing thread is not running.
- perform CPU profiler sampling in the sampler thread as we used to;
- skip sampling in the sampling thread if processing thread is running;
- only install SIGPROF handler when CPU profiling is enabled.

BUG=v8:2364

Review URL: https://codereview.chromium.org/11231002
Patch from Sergey Rogulenko <rogulenko@google.com> and Andrey Kosyakov <caseq@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-16 10:38:10 +00:00
mstarzinger@chromium.org
37759f4d64 Implement committed physical memory stats for Linux.
The patch introduces CommittedPhysicalMemory function to
the Heap class that reports committed *physical* memory acquired
for the heap from the OS.
It is important because some OSes may defer actual committment on e.g.
first access to the region.
So reporting just plain committed size led to various weird artifacts
like showing V8 allocated memory higher than the whole process
private size.

BUG=v8:2191

Review URL: https://codereview.chromium.org/11066118
Patch from Alexei Filippov <alph@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12793 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-22 16:33:10 +00:00
jkummerow@chromium.org
62223bd2c0 Revert recent CPU profiler changes because they broke --prof.
This reverts r12649 and r12650.

BUG=v8:2364

Review URL: https://codereview.chromium.org/11193020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-17 12:24:31 +00:00
jkummerow@chromium.org
ecc7f4baad Replacing circular queue by single buffer in CPU Profiler.
BUG=None

Review URL: https://codereview.chromium.org/10871039
Patch from Sergey Rogulenko <rogulenko@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 10:51:00 +00:00
jkummerow@chromium.org
dfb4218a04 Moving cpu profiling into its own thread.
BUG=None

Review URL: https://codereview.chromium.org/10857035
Patch from Sergey Rogulenko <rogulenko@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 09:58:11 +00:00
mstarzinger@chromium.org
5b64362706 Revert r12625 due to sandbox incompatibility.
Original message: Implement committed physical memory stats for Linux.
This had to be reverted because it crashes when compiled into Chromium
due to the sandbox not allowing the mincore call.

R=verwaest@chromium.org
BUG=v8:2191

Review URL: https://codereview.chromium.org/11023010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-01 12:11:06 +00:00
mstarzinger@chromium.org
974a2268bb Implement committed physical memory stats for Linux.
The patch introduces CommittedPhysicalMemory function to the Heap class
that reports committed *physical* memory acquired from the OS.
It is important because some OSes may postpone actual commitment on e.g.
first access to the previously committed region.
So reporting just plain committed size led to various weird artifacts
like DevTools showing V8 allocated memory higher than the whole process
private size.

BUG=v8:2191

Review URL: https://codereview.chromium.org/10961042
Patch from Alexei Filippov <alph@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-27 13:27:50 +00:00
ulan@chromium.org
6df4bcfecf Add support for running low level profiler on Android.
R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10908122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-06 15:01:20 +00:00
svenpanne@chromium.org
b1e95913a0 Valgrind cleanliness, part 6: Introduce OS::TearDown, cleaning up 2 mutexes.
Review URL: https://chromiumcodereview.appspot.com/10084003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-13 14:08:31 +00:00
danno@chromium.org
db86043160 Minimize uses of lazy initialization by adding explicit initialization functions.
BUG=118686

Review URL: https://chromiumcodereview.appspot.com/9976003
Patch from Philippe Liard <pliard@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-05 14:10:39 +00:00
danno@chromium.org
63f033576c Fix performance regressions due to lazy initialization.
This CL:
- Adds a new trait parameter to LazyInstance to let it initialize the instance
  without paying the cost of atomic operations (which are expensive on Mac).
  This only works for users who don't care about thread-safety and this is now
the default initialization trait used by LazyInstance in v8.

- Reverts the changes that were made in r11010 in isolate.{cc,h}. That lets
  Isolate's accessors be as cheap as they were before (but adds one static initializer).

- Adds OS::PostSetup() used to initialize the math functions which depend on CPU features.
That lets the math functions get rid of CallOnce().

BUG=118686

Review URL: https://chromiumcodereview.appspot.com/9873023
Patch from Philippe Liard <pliard@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-30 14:30:46 +00:00
fschneider@chromium.org
1f7d42efc9 Landing for pliard@chromium.org: Remove static initializers in v8.
This change includes two CLs by pliard@chromium.org:

1. http://codereview.chromium.org/9447052/ (Add CallOnce() and simple LazyInstance implementation):

Note that this implementation of LazyInstance does not handle global destructors (i.e. the lazy instances are never deleted).

This CL was initially reviewed on codereview.appspot.com:
http://codereview.appspot.com/5687064/



2.  http://codereview.chromium.org/9455088/ (Remove static initializers in v8):
This CL depends on CL 9447052 (adding CallOnce and LazyInstance).
It is based on a patch sent by Digit.

With this patch applied, we have only one static initializer left (in atomicops_internals_x86_gcc.cc). This static initializer populates a structure used by x86 atomic operations. It seems that we can hardly remove it. If possible, it will be removed in a next CL. 

This CL also modifies the presubmit script to check the number of static initializers.


BUG=v8:1859
Review URL: https://chromiumcodereview.appspot.com/9666052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-12 13:56:56 +00:00
vegorov@chromium.org
fbc230e42b Ensure that executable pages are properly guarded.
Split executable memory chunks into two pieces: header with all metadata (protection: RW) and body (protection: RWX). Separate header from metadata with a guard page and add a guard page after the page body.

R=erik.corry@gmail.com
BUG=http://crbug.com/115151

Review URL: https://chromiumcodereview.appspot.com/9452002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-23 12:11:24 +00:00
erik.corry@gmail.com
79112684b5 Increase size of small stacks from 32k to 64k to avoid hitting
limits in Chromium.
http://code.google.com/p/chromium/issues/detail?id=112843
Review URL: https://chromiumcodereview.appspot.com/9353006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-07 08:00:36 +00:00