jochen@chromium.org
799fc835f8
Move atomic ops and related files to base library
...
BUG=none
R=jkummerow@chromium.org
LOG=n
Review URL: https://codereview.chromium.org/316133002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21693 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-05 12:14:47 +00:00
jochen@chromium.org
56a486c322
Use full include paths everywhere
...
- this avoids using relative include paths which are forbidden by the style guide
- makes the code more readable since it's clear which header is meant
- allows for starting to use checkdeps
BUG=none
R=jkummerow@chromium.org , danno@chromium.org
LOG=n
Review URL: https://codereview.chromium.org/304153016
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-03 08:12:43 +00:00
jochen@chromium.org
0d1dc27eda
Reland 21482 - "Merge v8globals.h and globals.h"
...
> BUG=none
> R=mstarzinger@chromium.org
> LOG=n
>
> Review URL: https://codereview.chromium.org/293363006
BUG=none
TBR=mstarzinger@chromium.org
LOG=n
Review URL: https://codereview.chromium.org/295373003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-26 11:28:08 +00:00
verwaest@chromium.org
53bbe2aec9
Revert "Merge v8globals.h and globals.h"
...
Because of tree redness.
TBR=jochen@chromium.org
Review URL: https://codereview.chromium.org/306443002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-26 08:39:04 +00:00
jochen@chromium.org
cd818d697d
Merge v8globals.h and globals.h
...
BUG=none
R=mstarzinger@chromium.org
LOG=n
Review URL: https://codereview.chromium.org/293363006
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-26 08:15:13 +00:00
bmeurer@chromium.org
d4b533d41b
Bulk update of Google copyright headers in source files.
...
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/259183002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-29 06:42:26 +00:00
marja@chromium.org
17a0655431
Fix some missing includes and forward declarations.
...
R=yangguo@chromium.org
BUG=
Review URL: https://codereview.chromium.org/214903002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-27 16:43:44 +00:00
yurys@chromium.org
e9c47357e6
Rename some of SamplingCircularQueue methods
...
Renamed StartDequeue -> Peek, FinishDequeue -> Remove.
BUG=None
R=bmeurer@chromium.org , loislo@chromium.org
Review URL: https://codereview.chromium.org/23686006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16549 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-05 10:31:18 +00:00
bmeurer@chromium.org
10a4570282
Add V8_ALIGNAS() and V8_ALIGNOF() and use that in lazy-instance.h.
...
This renames the existing V8_ALIGNAS() to V8_ALIGNED(), and introduces
V8_ALIGNAS(type, alignment) which aligns according to the type and falls
back to aligning according to alignment.
Also use __attribute__((aligned(n))) instead of __attribute__((__aligned__(n))).
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/22999052
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-26 11:18:28 +00:00
yurys@chromium.org
47c77181e3
Fix compilation on Windows after r16284
...
BUG=None
R=jkummerow@chromium.org
Review URL: https://codereview.chromium.org/23361023
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-23 08:43:57 +00:00
yurys@chromium.org
969aba8fc0
Rewrite SamplingCircularQueue
...
The new implementation:
* uses MemoryBarriers to make sure up-to-date data is accessed on both producer and consumer threads
* will not allow to overwrite records
* doesn't have notion of chunks, instead each entry is aligned on the cache line boundaries
BUG=v8:2814
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/22849002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-23 08:22:07 +00:00
yurys@chromium.org
56cc999f93
Fix Windows compilation after r15750
...
BUG=None
TBR=yangguo@chromium.org
Review URL: https://codereview.chromium.org/19778003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-18 14:28:00 +00:00
yurys@chromium.org
97681be4e5
Fix data race in SamplingCircularQueue
...
This change fixes data race described in the bug by adding Acquire_Load to SamplingCircularQueue::StartDequeue and Acquire_Store to SamplingCircularQueue::Enqueue.
Also the queue implementation imposed a constraint on the records it stored: the first AtomicWord in each record was a marker. For that purpose TickSampleEventRecord had filter field of type int. This approach is error prone, e.g. on x64 sizeof(AtomicWord) is 8 while sizeof(int) is 4. Moreover the queue needs such marker only at the beginning of chunk. I changed the queue so that it stores the marker explicitly as the first Cell in chunk and removed the filter field.
BUG=251218
R=loislo@chromium.org , yangguo@chromium.org
Review URL: https://codereview.chromium.org/19642002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-18 13:42:04 +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
mikhail.naganov@gmail.com
decd0fed78
CPU profiler: make code events handling scalable.
...
I changed the implementation of a queue between the VM and processor
thread to be unbounded and lock-free, using Herb Sutter's example from
DDJ article: http://www.ddj.com/high-performance-computing/210604448
This had brought back profiling overhead to a minimum for the page
from Chromium's issue 16184.
BUG=714
Review URL: http://codereview.chromium.org/2091019
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-22 05:27:19 +00:00
mikhail.naganov@gmail.com
dde48831be
C++ profiles processor: put under #ifdef and fix issues.
...
Review URL: http://codereview.chromium.org/1514006
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-30 11:38:39 +00:00
mikhail.naganov@gmail.com
71754ebe81
Add multithreading test for SamplingCircularQueue, fix implementation.
...
This is for the case of Linux, where sampling is done using SIGPROF
signal handler which is executed in the context of an interrupted
thread. In this case, my previous implementation with TLS doesn't
work.
Review URL: http://codereview.chromium.org/1138004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4207 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-22 14:23:45 +00:00
mikhail.naganov@gmail.com
d2188658ca
Re-apply r4159 now with working test on x64
...
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/979005
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 13:15:42 +00:00
fschneider@chromium.org
9f318feb93
Revert r4159 because of x64 test failures.
...
Review URL: http://codereview.chromium.org/1049003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 13:04:07 +00:00
mikhail.naganov@gmail.com
ce9298029d
Implement circular queues for the C++ version of CPU profiler.
...
Circular queues serve as a transport for communicating between
VM, stack sampler and analyzer threads. Logging requirements
for VM and stack sampler are completely different, that's why
I introduced two different versions of CQs.
Review URL: http://codereview.chromium.org/1047002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 12:25:10 +00:00