| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0140fac commit 92d83d1
33 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,7 +36,7 @@ | |||
| 36 | 36 | ||
| 37 | 37 | # Reset this number to 0 on major V8 upgrades. | |
| 38 | 38 | # Increment by one for each non-official patch applied to deps/v8. | |
| 39 | - 'v8_embedder_string': '-node.9', | ||
| 39 | + 'v8_embedder_string': '-node.10', | ||
| 40 | 40 | ||
| 41 | 41 | ##### V8 defaults for Node.js ##### | |
| 42 | 42 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,7 +33,6 @@ const int kApiSystemPointerSize = sizeof(void*); | |||
| 33 | 33 | const int kApiDoubleSize = sizeof(double); | |
| 34 | 34 | const int kApiInt32Size = sizeof(int32_t); | |
| 35 | 35 | const int kApiInt64Size = sizeof(int64_t); | |
| 36 | - const int kApiSizetSize = sizeof(size_t); | ||
| 37 | 36 | ||
| 38 | 37 | // Tag information for HeapObject. | |
| 39 | 38 | const int kHeapObjectTag = 1; | |
@@ -231,12 +230,8 @@ class Internals { | |||
| 231 | 230 | kIsolateFastCCallCallerFpOffset + kApiSystemPointerSize; | |
| 232 | 231 | static const int kIsolateFastApiCallTargetOffset = | |
| 233 | 232 | kIsolateFastCCallCallerPcOffset + kApiSystemPointerSize; | |
| 234 | - static const int kIsolateCageBaseOffset = | ||
| 235 | - kIsolateFastApiCallTargetOffset + kApiSystemPointerSize; | ||
| 236 | - static const int kIsolateLongTaskStatsCounterOffset = | ||
| 237 | - kIsolateCageBaseOffset + kApiSystemPointerSize; | ||
| 238 | 233 | static const int kIsolateStackGuardOffset = | |
| 239 | - kIsolateLongTaskStatsCounterOffset + kApiSizetSize; | ||
| 234 | + kIsolateFastApiCallTargetOffset + kApiSystemPointerSize; | ||
| 240 | 235 | static const int kIsolateRootsOffset = | |
| 241 | 236 | kIsolateStackGuardOffset + 7 * kApiSystemPointerSize; | |
| 242 | 237 | ||
@@ -369,12 +364,6 @@ class Internals { | |||
| 369 | 364 | return *reinterpret_cast<void* const*>(addr); | |
| 370 | 365 | } | |
| 371 | 366 | ||
| 372 | - V8_INLINE static void IncrementLongTasksStatsCounter(v8::Isolate* isolate) { | ||
| 373 | - internal::Address addr = reinterpret_cast<internal::Address>(isolate) + | ||
| 374 | - kIsolateLongTaskStatsCounterOffset; | ||
| 375 | - ++(*reinterpret_cast<size_t*>(addr)); | ||
| 376 | - } | ||
| 377 | - | ||
| 378 | 367 | V8_INLINE static internal::Address* GetRoot(v8::Isolate* isolate, int index) { | |
| 379 | 368 | internal::Address addr = reinterpret_cast<internal::Address>(isolate) + | |
| 380 | 369 | kIsolateRootsOffset + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,8 +5,7 @@ | |||
| 5 | 5 | #ifndef V8_METRICS_H_ | |
| 6 | 6 | #define V8_METRICS_H_ | |
| 7 | 7 | ||
| 8 | - #include "v8-internal.h" // NOLINT(build/include_directory) | ||
| 9 | - #include "v8.h" // NOLINT(build/include_directory) | ||
| 8 | + #include "v8.h" // NOLINT(build/include_directory) | ||
| 10 | 9 | ||
| 11 | 10 | namespace v8 { | |
| 12 | 11 | namespace metrics { | |
@@ -197,32 +196,6 @@ class V8_EXPORT Recorder { | |||
| 197 | 196 | static ContextId GetContextId(Local<Context> context); | |
| 198 | 197 | }; | |
| 199 | 198 | ||
| 200 | - /** | ||
| 201 | - * Experimental API intended for the LongTasks UKM (crbug.com/1173527). | ||
| 202 | - * The Reset() method should be called at the start of a potential | ||
| 203 | - * long task. The Get() method returns durations of V8 work that | ||
| 204 | - * happened during the task. | ||
| 205 | - * | ||
| 206 | - * This API is experimental and may be removed/changed in the future. | ||
| 207 | - */ | ||
| 208 | - struct V8_EXPORT LongTaskStats { | ||
| 209 | - /** | ||
| 210 | - * Resets durations of V8 work for the new task. | ||
| 211 | - */ | ||
| 212 | - V8_INLINE static void Reset(Isolate* isolate) { | ||
| 213 | - v8::internal::Internals::IncrementLongTasksStatsCounter(isolate); | ||
| 214 | - } | ||
| 215 | - | ||
| 216 | - /** | ||
| 217 | - * Returns durations of V8 work that happened since the last Reset(). | ||
| 218 | - */ | ||
| 219 | - static LongTaskStats Get(Isolate* isolate); | ||
| 220 | - | ||
| 221 | - int64_t gc_full_atomic_wall_clock_duration_us = 0; | ||
| 222 | - int64_t gc_full_incremental_wall_clock_duration_us = 0; | ||
| 223 | - int64_t gc_young_wall_clock_duration_us = 0; | ||
| 224 | - }; | ||
| 225 | - | ||
| 226 | 199 | } // namespace metrics | |
| 227 | 200 | } // namespace v8 | |
| 228 | 201 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -181,8 +181,9 @@ class JobDelegate { | |||
| 181 | 181 | /** | |
| 182 | 182 | * Returns true if the current task is called from the thread currently | |
| 183 | 183 | * running JobHandle::Join(). | |
| 184 | + * TODO(etiennep): Make pure virtual once custom embedders implement it. | ||
| 184 | 185 | */ | |
| 185 | - virtual bool IsJoiningThread() const = 0; | ||
| 186 | + virtual bool IsJoiningThread() const { return false; } | ||
| 186 | 187 | }; | |
| 187 | 188 | ||
| 188 | 189 | /** | |
@@ -219,21 +220,30 @@ class JobHandle { | |||
| 219 | 220 | * Forces all existing workers to yield ASAP but doesn’t wait for them. | |
| 220 | 221 | * Warning, this is dangerous if the Job's callback is bound to or has access | |
| 221 | 222 | * to state which may be deleted after this call. | |
| 223 | + * TODO(etiennep): Cleanup once implemented by all embedders. | ||
| 222 | 224 | */ | |
| 223 | - virtual void CancelAndDetach() = 0; | ||
| 225 | + virtual void CancelAndDetach() { Cancel(); } | ||
| 224 | 226 | ||
| 225 | 227 | /** | |
| 226 | 228 | * Returns true if there's any work pending or any worker running. | |
| 227 | 229 | */ | |
| 228 | 230 | virtual bool IsActive() = 0; | |
| 229 | 231 | ||
| 232 | + // TODO(etiennep): Clean up once all overrides are removed. | ||
| 233 | + V8_DEPRECATED("Use !IsActive() instead.") | ||
| 234 | + virtual bool IsCompleted() { return !IsActive(); } | ||
| 235 | + | ||
| 230 | 236 | /** | |
| 231 | 237 | * Returns true if associated with a Job and other methods may be called. | |
| 232 | 238 | * Returns false after Join() or Cancel() was called. This may return true | |
| 233 | 239 | * even if no workers are running and IsCompleted() returns true | |
| 234 | 240 | */ | |
| 235 | 241 | virtual bool IsValid() = 0; | |
| 236 | 242 | ||
| 243 | + // TODO(etiennep): Clean up once all overrides are removed. | ||
| 244 | + V8_DEPRECATED("Use IsValid() instead.") | ||
| 245 | + virtual bool IsRunning() { return IsValid(); } | ||
| 246 | + | ||
| 237 | 247 | /** | |
| 238 | 248 | * Returns true if job priority can be changed. | |
| 239 | 249 | */ | |
@@ -262,6 +272,10 @@ class JobTask { | |||
| 262 | 272 | * it must not call back any JobHandle methods. | |
| 263 | 273 | */ | |
| 264 | 274 | virtual size_t GetMaxConcurrency(size_t worker_count) const = 0; | |
| 275 | + | ||
| 276 | + // TODO(1114823): Clean up once all overrides are removed. | ||
| 277 | + V8_DEPRECATED("Use the version that takes |worker_count|.") | ||
| 278 | + virtual size_t GetMaxConcurrency() const { return 0; } | ||
| 265 | 279 | }; | |
| 266 | 280 | ||
| 267 | 281 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -289,8 +289,8 @@ class V8_EXPORT CpuProfilingOptions { | |||
| 289 | 289 | * interval, set via SetSamplingInterval(). If | |
| 290 | 290 | * zero, the sampling interval will be equal to | |
| 291 | 291 | * the profiler's sampling interval. | |
| 292 | - * \param filter_context If specified, profiles will only contain frames | ||
| 293 | - * using this context. Other frames will be elided. | ||
| 292 | + * \param filter_context Deprecated option to filter by context, currently a | ||
| 293 | + * no-op. | ||
| 294 | 294 | */ | |
| 295 | 295 | CpuProfilingOptions( | |
| 296 | 296 | CpuProfilingMode mode = kLeafNodeLineNumbers, | |
@@ -304,13 +304,9 @@ class V8_EXPORT CpuProfilingOptions { | |||
| 304 | 304 | private: | |
| 305 | 305 | friend class internal::CpuProfile; | |
| 306 | 306 | ||
| 307 | - bool has_filter_context() const { return !filter_context_.IsEmpty(); } | ||
| 308 | - void* raw_filter_context() const; | ||
| 309 | - | ||
| 310 | 307 | CpuProfilingMode mode_; | |
| 311 | 308 | unsigned max_samples_; | |
| 312 | 309 | int sampling_interval_us_; | |
| 313 | - CopyablePersistentTraits<Context>::CopyablePersistent filter_context_; | ||
| 314 | 310 | }; | |
| 315 | 311 | ||
| 316 | 312 | /** | |
@@ -900,6 +896,14 @@ class V8_EXPORT HeapProfiler { | |||
| 900 | 896 | * Takes a heap snapshot and returns it. | |
| 901 | 897 | */ | |
| 902 | 898 | const HeapSnapshot* TakeHeapSnapshot( | |
| 899 | + ActivityControl* control = nullptr, | ||
| 900 | + ObjectNameResolver* global_object_name_resolver = nullptr, | ||
| 901 | + bool treat_global_objects_as_roots = true); | ||
| 902 | + | ||
| 903 | + /** | ||
| 904 | + * Takes a heap snapshot and returns it. | ||
| 905 | + */ | ||
| 906 | + const HeapSnapshot* TakeHeapSnapshotV8_92( | ||
| 903 | 907 | ActivityControl* control = nullptr, | |
| 904 | 908 | ObjectNameResolver* global_object_name_resolver = nullptr, | |
| 905 | 909 | bool treat_global_objects_as_roots = true, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments