libv8-node 15.14.0.0-x86_64-linux → 16.17.0.0-x86_64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/libv8-node/location.rb +1 -1
- data/ext/libv8-node/paths.rb +5 -1
- data/lib/libv8/node/version.rb +3 -3
- data/vendor/v8/include/cppgc/allocation.h +105 -45
- data/vendor/v8/include/cppgc/common.h +9 -6
- data/vendor/v8/include/cppgc/cross-thread-persistent.h +413 -0
- data/vendor/v8/include/cppgc/custom-space.h +37 -2
- data/vendor/v8/include/cppgc/default-platform.h +47 -48
- data/vendor/v8/include/cppgc/ephemeron-pair.h +30 -0
- data/vendor/v8/include/cppgc/explicit-management.h +82 -0
- data/vendor/v8/include/cppgc/garbage-collected.h +4 -3
- data/vendor/v8/include/cppgc/heap-consistency.h +253 -0
- data/vendor/v8/include/cppgc/heap-state.h +70 -0
- data/vendor/v8/include/cppgc/heap-statistics.h +120 -0
- data/vendor/v8/include/cppgc/heap.h +68 -6
- data/vendor/v8/include/cppgc/internal/api-constants.h +3 -3
- data/vendor/v8/include/cppgc/internal/caged-heap-local-data.h +2 -1
- data/vendor/v8/include/cppgc/internal/compiler-specific.h +2 -2
- data/vendor/v8/include/cppgc/internal/gc-info.h +44 -13
- data/vendor/v8/include/cppgc/internal/name-trait.h +111 -0
- data/vendor/v8/include/cppgc/internal/persistent-node.h +58 -2
- data/vendor/v8/include/cppgc/internal/pointer-policies.h +69 -28
- data/vendor/v8/include/cppgc/internal/prefinalizer-handler.h +1 -1
- data/vendor/v8/include/cppgc/internal/write-barrier.h +390 -35
- data/vendor/v8/include/cppgc/liveness-broker.h +11 -2
- data/vendor/v8/include/cppgc/macros.h +2 -0
- data/vendor/v8/include/cppgc/member.h +87 -25
- data/vendor/v8/include/cppgc/name-provider.h +65 -0
- data/vendor/v8/include/cppgc/object-size-trait.h +58 -0
- data/vendor/v8/include/cppgc/persistent.h +40 -10
- data/vendor/v8/include/cppgc/platform.h +49 -25
- data/vendor/v8/include/cppgc/prefinalizer.h +1 -1
- data/vendor/v8/include/cppgc/process-heap-statistics.h +36 -0
- data/vendor/v8/include/cppgc/sentinel-pointer.h +32 -0
- data/vendor/v8/include/cppgc/source-location.h +2 -1
- data/vendor/v8/include/cppgc/testing.h +99 -0
- data/vendor/v8/include/cppgc/trace-trait.h +8 -3
- data/vendor/v8/include/cppgc/type-traits.h +157 -19
- data/vendor/v8/include/cppgc/visitor.h +194 -28
- data/vendor/v8/include/libplatform/libplatform.h +11 -0
- data/vendor/v8/include/libplatform/v8-tracing.h +2 -0
- data/vendor/v8/include/v8-cppgc.h +258 -159
- data/vendor/v8/include/v8-fast-api-calls.h +603 -155
- data/vendor/v8/include/v8-inspector.h +22 -4
- data/vendor/v8/include/v8-internal.h +111 -27
- data/vendor/v8/include/v8-metrics.h +77 -8
- data/vendor/v8/include/v8-platform.h +47 -22
- data/vendor/v8/include/v8-profiler.h +75 -11
- data/vendor/v8/include/v8-unwinder-state.h +30 -0
- data/vendor/v8/include/v8-util.h +1 -1
- data/vendor/v8/include/v8-version.h +4 -4
- data/vendor/v8/include/v8.h +1196 -642
- data/vendor/v8/include/v8config.h +87 -11
- data/vendor/v8/{out.gn → x86_64-linux}/libv8/obj/libv8_monolith.a +0 -0
- metadata +17 -5
- data/vendor/v8/include/cppgc/internal/process-heap.h +0 -34
@@ -6,6 +6,7 @@
|
|
6
6
|
#define V8_V8_PROFILER_H_
|
7
7
|
|
8
8
|
#include <limits.h>
|
9
|
+
|
9
10
|
#include <memory>
|
10
11
|
#include <unordered_set>
|
11
12
|
#include <vector>
|
@@ -248,6 +249,26 @@ enum CpuProfilingLoggingMode {
|
|
248
249
|
kEagerLogging,
|
249
250
|
};
|
250
251
|
|
252
|
+
// Enum for returning profiling status. Once StartProfiling is called,
|
253
|
+
// we want to return to clients whether the profiling was able to start
|
254
|
+
// correctly, or return a descriptive error.
|
255
|
+
enum class CpuProfilingStatus {
|
256
|
+
kStarted,
|
257
|
+
kAlreadyStarted,
|
258
|
+
kErrorTooManyProfilers
|
259
|
+
};
|
260
|
+
|
261
|
+
/**
|
262
|
+
* Delegate for when max samples reached and samples are discarded.
|
263
|
+
*/
|
264
|
+
class V8_EXPORT DiscardedSamplesDelegate {
|
265
|
+
public:
|
266
|
+
DiscardedSamplesDelegate() {}
|
267
|
+
|
268
|
+
virtual ~DiscardedSamplesDelegate() = default;
|
269
|
+
virtual void Notify() = 0;
|
270
|
+
};
|
271
|
+
|
251
272
|
/**
|
252
273
|
* Optional profiling attributes.
|
253
274
|
*/
|
@@ -268,6 +289,8 @@ class V8_EXPORT CpuProfilingOptions {
|
|
268
289
|
* interval, set via SetSamplingInterval(). If
|
269
290
|
* zero, the sampling interval will be equal to
|
270
291
|
* the profiler's sampling interval.
|
292
|
+
* \param filter_context Deprecated option to filter by context, currently a
|
293
|
+
* no-op.
|
271
294
|
*/
|
272
295
|
CpuProfilingOptions(
|
273
296
|
CpuProfilingMode mode = kLeafNodeLineNumbers,
|
@@ -281,13 +304,9 @@ class V8_EXPORT CpuProfilingOptions {
|
|
281
304
|
private:
|
282
305
|
friend class internal::CpuProfile;
|
283
306
|
|
284
|
-
bool has_filter_context() const { return !filter_context_.IsEmpty(); }
|
285
|
-
void* raw_filter_context() const;
|
286
|
-
|
287
307
|
CpuProfilingMode mode_;
|
288
308
|
unsigned max_samples_;
|
289
309
|
int sampling_interval_us_;
|
290
|
-
CopyablePersistentTraits<Context>::CopyablePersistent filter_context_;
|
291
310
|
};
|
292
311
|
|
293
312
|
/**
|
@@ -338,7 +357,9 @@ class V8_EXPORT CpuProfiler {
|
|
338
357
|
* profiles may be collected at once. Attempts to start collecting several
|
339
358
|
* profiles with the same title are silently ignored.
|
340
359
|
*/
|
341
|
-
|
360
|
+
CpuProfilingStatus StartProfiling(
|
361
|
+
Local<String> title, CpuProfilingOptions options,
|
362
|
+
std::unique_ptr<DiscardedSamplesDelegate> delegate = nullptr);
|
342
363
|
|
343
364
|
/**
|
344
365
|
* Starts profiling with the same semantics as above, except with expanded
|
@@ -351,7 +372,7 @@ class V8_EXPORT CpuProfiler {
|
|
351
372
|
* recorded by the profiler. Samples obtained after this limit will be
|
352
373
|
* discarded.
|
353
374
|
*/
|
354
|
-
|
375
|
+
CpuProfilingStatus StartProfiling(
|
355
376
|
Local<String> title, CpuProfilingMode mode, bool record_samples = false,
|
356
377
|
unsigned max_samples = CpuProfilingOptions::kNoSampleLimit);
|
357
378
|
/**
|
@@ -359,7 +380,8 @@ class V8_EXPORT CpuProfiler {
|
|
359
380
|
* kLeafNodeLineNumbers mode, which was the previous default behavior of the
|
360
381
|
* profiler.
|
361
382
|
*/
|
362
|
-
|
383
|
+
CpuProfilingStatus StartProfiling(Local<String> title,
|
384
|
+
bool record_samples = false);
|
363
385
|
|
364
386
|
/**
|
365
387
|
* Stops collecting CPU profile with a given title and returns it.
|
@@ -470,7 +492,7 @@ class V8_EXPORT HeapGraphNode {
|
|
470
492
|
/**
|
471
493
|
* An interface for exporting data from V8, using "push" model.
|
472
494
|
*/
|
473
|
-
class V8_EXPORT OutputStream {
|
495
|
+
class V8_EXPORT OutputStream {
|
474
496
|
public:
|
475
497
|
enum WriteResult {
|
476
498
|
kContinue = 0,
|
@@ -497,7 +519,6 @@ class V8_EXPORT OutputStream { // NOLINT
|
|
497
519
|
}
|
498
520
|
};
|
499
521
|
|
500
|
-
|
501
522
|
/**
|
502
523
|
* HeapSnapshots record the state of the JS heap at some moment.
|
503
524
|
*/
|
@@ -564,7 +585,7 @@ class V8_EXPORT HeapSnapshot {
|
|
564
585
|
* An interface for reporting progress and controlling long-running
|
565
586
|
* activities.
|
566
587
|
*/
|
567
|
-
class V8_EXPORT ActivityControl {
|
588
|
+
class V8_EXPORT ActivityControl {
|
568
589
|
public:
|
569
590
|
enum ControlOption {
|
570
591
|
kContinue = 0,
|
@@ -578,7 +599,6 @@ class V8_EXPORT ActivityControl { // NOLINT
|
|
578
599
|
virtual ControlOption ReportProgressValue(int done, int total) = 0;
|
579
600
|
};
|
580
601
|
|
581
|
-
|
582
602
|
/**
|
583
603
|
* AllocationProfile is a sampled profile of allocations done by the program.
|
584
604
|
* This is structured as a call-graph.
|
@@ -712,6 +732,19 @@ class V8_EXPORT EmbedderGraph {
|
|
712
732
|
public:
|
713
733
|
class Node {
|
714
734
|
public:
|
735
|
+
/**
|
736
|
+
* Detachedness specifies whether an object is attached or detached from the
|
737
|
+
* main application state. While unkown in general, there may be objects
|
738
|
+
* that specifically know their state. V8 passes this information along in
|
739
|
+
* the snapshot. Users of the snapshot may use it to annotate the object
|
740
|
+
* graph.
|
741
|
+
*/
|
742
|
+
enum class Detachedness : uint8_t {
|
743
|
+
kUnknown = 0,
|
744
|
+
kAttached = 1,
|
745
|
+
kDetached = 2,
|
746
|
+
};
|
747
|
+
|
715
748
|
Node() = default;
|
716
749
|
virtual ~Node() = default;
|
717
750
|
virtual const char* Name() = 0;
|
@@ -736,6 +769,14 @@ class V8_EXPORT EmbedderGraph {
|
|
736
769
|
*/
|
737
770
|
virtual NativeObject GetNativeObject() { return nullptr; }
|
738
771
|
|
772
|
+
/**
|
773
|
+
* Detachedness state of a given object. While unkown in general, there may
|
774
|
+
* be objects that specifically know their state. V8 passes this information
|
775
|
+
* along in the snapshot. Users of the snapshot may use it to annotate the
|
776
|
+
* object graph.
|
777
|
+
*/
|
778
|
+
virtual Detachedness GetDetachedness() { return Detachedness::kUnknown; }
|
779
|
+
|
739
780
|
Node(const Node&) = delete;
|
740
781
|
Node& operator=(const Node&) = delete;
|
741
782
|
};
|
@@ -786,6 +827,18 @@ class V8_EXPORT HeapProfiler {
|
|
786
827
|
v8::EmbedderGraph* graph,
|
787
828
|
void* data);
|
788
829
|
|
830
|
+
/**
|
831
|
+
* Callback function invoked during heap snapshot generation to retrieve
|
832
|
+
* the detachedness state of an object referenced by a TracedReference.
|
833
|
+
*
|
834
|
+
* The callback takes Local<Value> as parameter to allow the embedder to
|
835
|
+
* unpack the TracedReference into a Local and reuse that Local for different
|
836
|
+
* purposes.
|
837
|
+
*/
|
838
|
+
using GetDetachednessCallback = EmbedderGraph::Node::Detachedness (*)(
|
839
|
+
v8::Isolate* isolate, const v8::Local<v8::Value>& v8_value,
|
840
|
+
uint16_t class_id, void* data);
|
841
|
+
|
789
842
|
/** Returns the number of snapshots taken. */
|
790
843
|
int GetSnapshotCount();
|
791
844
|
|
@@ -847,6 +900,15 @@ class V8_EXPORT HeapProfiler {
|
|
847
900
|
ObjectNameResolver* global_object_name_resolver = nullptr,
|
848
901
|
bool treat_global_objects_as_roots = true);
|
849
902
|
|
903
|
+
/**
|
904
|
+
* Takes a heap snapshot and returns it.
|
905
|
+
*/
|
906
|
+
const HeapSnapshot* TakeHeapSnapshotV8_92(
|
907
|
+
ActivityControl* control = nullptr,
|
908
|
+
ObjectNameResolver* global_object_name_resolver = nullptr,
|
909
|
+
bool treat_global_objects_as_roots = true,
|
910
|
+
bool capture_numeric_value = false);
|
911
|
+
|
850
912
|
/**
|
851
913
|
* Starts tracking of heap objects population statistics. After calling
|
852
914
|
* this method, all heap objects relocations done by the garbage collector
|
@@ -936,6 +998,8 @@ class V8_EXPORT HeapProfiler {
|
|
936
998
|
void RemoveBuildEmbedderGraphCallback(BuildEmbedderGraphCallback callback,
|
937
999
|
void* data);
|
938
1000
|
|
1001
|
+
void SetGetDetachednessCallback(GetDetachednessCallback callback, void* data);
|
1002
|
+
|
939
1003
|
/**
|
940
1004
|
* Default value of persistent handle class ID. Must not be used to
|
941
1005
|
* define a class. Can be used to reset a class of a persistent
|
@@ -0,0 +1,30 @@
|
|
1
|
+
// Copyright 2020 the V8 project authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
3
|
+
// found in the LICENSE file.
|
4
|
+
|
5
|
+
#ifndef INCLUDE_V8_UNWINDER_STATE_H_
|
6
|
+
#define INCLUDE_V8_UNWINDER_STATE_H_
|
7
|
+
|
8
|
+
namespace v8 {
|
9
|
+
|
10
|
+
#ifdef V8_TARGET_ARCH_ARM
|
11
|
+
struct CalleeSavedRegisters {
|
12
|
+
void* arm_r4;
|
13
|
+
void* arm_r5;
|
14
|
+
void* arm_r6;
|
15
|
+
void* arm_r7;
|
16
|
+
void* arm_r8;
|
17
|
+
void* arm_r9;
|
18
|
+
void* arm_r10;
|
19
|
+
};
|
20
|
+
#elif V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM64 || \
|
21
|
+
V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC || \
|
22
|
+
V8_TARGET_ARCH_PPC64 || V8_TARGET_ARCH_RISCV64 || V8_TARGET_ARCH_S390
|
23
|
+
struct CalleeSavedRegisters {};
|
24
|
+
#else
|
25
|
+
#error Target architecture was not detected as supported by v8
|
26
|
+
#endif
|
27
|
+
|
28
|
+
} // namespace v8
|
29
|
+
|
30
|
+
#endif // INCLUDE_V8_UNWINDER _STATE_H_
|
data/vendor/v8/include/v8-util.h
CHANGED
@@ -43,7 +43,7 @@ class StdMapTraits {
|
|
43
43
|
|
44
44
|
static bool Empty(Impl* impl) { return impl->empty(); }
|
45
45
|
static size_t Size(Impl* impl) { return impl->size(); }
|
46
|
-
static void Swap(Impl& a, Impl& b) { std::swap(a, b); }
|
46
|
+
static void Swap(Impl& a, Impl& b) { std::swap(a, b); }
|
47
47
|
static Iterator Begin(Impl* impl) { return impl->begin(); }
|
48
48
|
static Iterator End(Impl* impl) { return impl->end(); }
|
49
49
|
static K Key(Iterator it) { return it->first; }
|
@@ -8,10 +8,10 @@
|
|
8
8
|
// These macros define the version number for the current version.
|
9
9
|
// NOTE these macros are used by some of the tool scripts and the build
|
10
10
|
// system so their names cannot be changed without changing the scripts.
|
11
|
-
#define V8_MAJOR_VERSION
|
12
|
-
#define V8_MINOR_VERSION
|
13
|
-
#define V8_BUILD_NUMBER
|
14
|
-
#define V8_PATCH_LEVEL
|
11
|
+
#define V8_MAJOR_VERSION 9
|
12
|
+
#define V8_MINOR_VERSION 4
|
13
|
+
#define V8_BUILD_NUMBER 146
|
14
|
+
#define V8_PATCH_LEVEL 26
|
15
15
|
|
16
16
|
// Use 1 for candidates and 0 otherwise.
|
17
17
|
// (Boolean macro values are not supported by all preprocessors.)
|