DescriptionReland: Create libsampler as V8 sampler library.
This patch does five things:
1. Extracts sampler as libsampler to provide sampling functionality support.
2. Makes SampleStack virtual so embedders can override the behaviour of sample collecting.
3. Removes sampler.[h|cc].
4. Moves sampling thread into log.cc as workaround to keep the --prof functionality.
5. Creates SamplerManager to manage the relationship between samplers and threads.
The reason we port hashmap.h is that in debug mode, STL containers are using
mutexes from a mutex pool, which may lead to deadlock when using asynchronously
signal handler.
Currently libsampler is used in V8 temporarily.
BUG=v8:4789
LOG=n
Committed: https://crrev.com/06cc9b7c176a6223971deaa9fbcafe1a05058c7b
Cr-Commit-Position: refs/heads/master@{#36527}
Committed: https://crrev.com/a0198c0f627de392280f00099333f96ee34d2519
Cr-Commit-Position: refs/heads/master@{#36532}
Patch Set 1 #Patch Set 2 : #
Total comments: 8
Patch Set 3 : #
Total comments: 6
Patch Set 4 : #
Total comments: 8
Patch Set 5 : #
Total comments: 1
Patch Set 6 : Rebase #
Total comments: 2
Patch Set 7 : Add BUILD.gn target, address jochen's comment, rebase. #Patch Set 8 : #Patch Set 9 : update test #
Total comments: 4
Patch Set 10 : Add v8 dependency for libsampler in v8.gyp, rebased #Patch Set 11 : Move sampling thread to log.cc, use libsampler in v8 as workaround, delete sampler.[h|cc] #Patch Set 12 : Fix windows build failure. #Patch Set 13 : Fix GN build with Chrome #Patch Set 14 : #Patch Set 15 : Use LazyInstance for std::map, fix static-initializer check #Patch Set 16 : Switch list to vector #Patch Set 17 : Port hashmap #Patch Set 18 : #Patch Set 19 : #
Total comments: 12
Patch Set 20 : #Patch Set 21 : Address alph's comments #Patch Set 22 : Fix ASAN failure #Patch Set 23 : #
Total comments: 6
Patch Set 24 : Address alph's comment #
Total comments: 1
Patch Set 25 : Fix TSAN failure #
Messages
Total messages: 64 (19 generated)
|