@@ -54,7 +54,7 @@ namespace v8 {
54
54
*/
55
55
class V8_EXPORT TracingCpuProfiler {
56
56
public:
57
- V8_DEPRECATED (
57
+ V8_DEPRECATE_SOON (
58
58
" The profiler is created automatically with the isolate.\n "
59
59
" No need to create it explicitly." ,
60
60
static std::unique_ptr<TracingCpuProfiler> Create (Isolate*));
@@ -278,16 +278,6 @@ class V8_EXPORT CpuProfile {
278
278
void Delete ();
279
279
};
280
280
281
- enum CpuProfilingMode {
282
- // In the resulting CpuProfile tree, intermediate nodes in a stack trace
283
- // (from the root to a leaf) will have line numbers that point to the start
284
- // line of the function, rather than the line of the callsite of the child.
285
- kLeafNodeLineNumbers ,
286
- // In the resulting CpuProfile tree, nodes are separated based on the line
287
- // number of their callsite in their parent.
288
- kCallerLineNumbers ,
289
- };
290
-
291
281
/* *
292
282
* Interface for controlling CPU profiling. Instance of the
293
283
* profiler can be created using v8::CpuProfiler::New method.
@@ -331,13 +321,6 @@ class V8_EXPORT CpuProfiler {
331
321
* |record_samples| parameter controls whether individual samples should
332
322
* be recorded in addition to the aggregated tree.
333
323
*/
334
- void StartProfiling (Local<String> title, CpuProfilingMode mode,
335
- bool record_samples = false );
336
- /* *
337
- * The same as StartProfiling above, but the CpuProfilingMode defaults to
338
- * kLeafNodeLineNumbers mode, which was the previous default behavior of the
339
- * profiler.
340
- */
341
324
void StartProfiling (Local<String> title, bool record_samples = false );
342
325
343
326
/* *
@@ -660,7 +643,7 @@ class V8_EXPORT AllocationProfile {
660
643
* Usage:
661
644
* 1) Define derived class of EmbedderGraph::Node for embedder objects.
662
645
* 2) Set the build embedder graph callback on the heap profiler using
663
- * HeapProfiler::AddBuildEmbedderGraphCallback .
646
+ * HeapProfiler::SetBuildEmbedderGraphCallback .
664
647
* 3) In the callback use graph->AddEdge(node1, node2) to add an edge from
665
648
* node1 to node2.
666
649
* 4) To represent references from/to V8 object, construct V8 nodes using
@@ -714,14 +697,11 @@ class V8_EXPORT EmbedderGraph {
714
697
virtual Node* AddNode (std::unique_ptr<Node> node) = 0;
715
698
716
699
/* *
717
- * Adds an edge that represents a strong reference from the given
718
- * node |from| to the given node |to|. The nodes must be added to the graph
700
+ * Adds an edge that represents a strong reference from the given node
701
+ * |from| to the given node |to|. The nodes must be added to the graph
719
702
* before calling this function.
720
- *
721
- * If name is nullptr, the edge will have auto-increment indexes, otherwise
722
- * it will be named accordingly.
723
703
*/
724
- virtual void AddEdge (Node* from, Node* to, const char * name = nullptr ) = 0;
704
+ virtual void AddEdge (Node* from, Node* to) = 0;
725
705
726
706
virtual ~EmbedderGraph () = default ;
727
707
};
@@ -771,11 +751,6 @@ class V8_EXPORT HeapProfiler {
771
751
* The callback must not trigger garbage collection in V8.
772
752
*/
773
753
typedef void (*BuildEmbedderGraphCallback)(v8::Isolate* isolate,
774
- v8::EmbedderGraph* graph,
775
- void * data);
776
-
777
- /* * TODO(addaleax): Remove */
778
- typedef void (*LegacyBuildEmbedderGraphCallback)(v8::Isolate* isolate,
779
754
v8::EmbedderGraph* graph);
780
755
781
756
/* * Returns the number of snapshots taken. */
@@ -918,22 +893,15 @@ class V8_EXPORT HeapProfiler {
918
893
919
894
/* * Binds a callback to embedder's class ID. */
920
895
V8_DEPRECATED (
921
- " Use AddBuildEmbedderGraphCallback to provide info about embedder nodes" ,
896
+ " Use SetBuildEmbedderGraphCallback to provide info about embedder nodes" ,
922
897
void SetWrapperClassInfoProvider (uint16_t class_id,
923
898
WrapperInfoCallback callback));
924
899
925
900
V8_DEPRECATED (
926
- " Use AddBuildEmbedderGraphCallback to provide info about embedder nodes" ,
901
+ " Use SetBuildEmbedderGraphCallback to provide info about embedder nodes" ,
927
902
void SetGetRetainerInfosCallback (GetRetainerInfosCallback callback));
928
903
929
- V8_DEPRECATE_SOON (
930
- " Use AddBuildEmbedderGraphCallback to provide info about embedder nodes" ,
931
- void SetBuildEmbedderGraphCallback (
932
- LegacyBuildEmbedderGraphCallback callback));
933
- void AddBuildEmbedderGraphCallback (BuildEmbedderGraphCallback callback,
934
- void * data);
935
- void RemoveBuildEmbedderGraphCallback (BuildEmbedderGraphCallback callback,
936
- void * data);
904
+ void SetBuildEmbedderGraphCallback (BuildEmbedderGraphCallback callback);
937
905
938
906
/* *
939
907
* Default value of persistent handle class ID. Must not be used to
@@ -1041,76 +1009,6 @@ struct HeapStatsUpdate {
1041
1009
uint32_t size; // New value of size field for the interval with this index.
1042
1010
};
1043
1011
1044
- #define CODE_EVENTS_LIST (V ) \
1045
- V (Builtin) \
1046
- V(Callback) \
1047
- V(Eval) \
1048
- V(Function) \
1049
- V(InterpretedFunction) \
1050
- V(Handler) \
1051
- V(BytecodeHandler) \
1052
- V(LazyCompile) \
1053
- V(RegExp) \
1054
- V(Script) \
1055
- V(Stub)
1056
-
1057
- /* *
1058
- * Note that this enum may be extended in the future. Please include a default
1059
- * case if this enum is used in a switch statement.
1060
- */
1061
- enum CodeEventType {
1062
- kUnknownType = 0
1063
- #define V (Name ) , k##Name##Type
1064
- CODE_EVENTS_LIST (V)
1065
- #undef V
1066
- };
1067
-
1068
- /* *
1069
- * Representation of a code creation event
1070
- */
1071
- class V8_EXPORT CodeEvent {
1072
- public:
1073
- uintptr_t GetCodeStartAddress ();
1074
- size_t GetCodeSize ();
1075
- Local<String> GetFunctionName ();
1076
- Local<String> GetScriptName ();
1077
- int GetScriptLine ();
1078
- int GetScriptColumn ();
1079
- /* *
1080
- * NOTE (mmarchini): We can't allocate objects in the heap when we collect
1081
- * existing code, and both the code type and the comment are not stored in the
1082
- * heap, so we return those as const char*.
1083
- */
1084
- CodeEventType GetCodeType ();
1085
- const char * GetComment ();
1086
-
1087
- static const char * GetCodeEventTypeName (CodeEventType code_event_type);
1088
- };
1089
-
1090
- /* *
1091
- * Interface to listen to code creation events.
1092
- */
1093
- class V8_EXPORT CodeEventHandler {
1094
- public:
1095
- /* *
1096
- * Creates a new listener for the |isolate|. The isolate must be initialized.
1097
- * The listener object must be disposed after use by calling |Dispose| method.
1098
- * Multiple listeners can be created for the same isolate.
1099
- */
1100
- explicit CodeEventHandler (Isolate* isolate);
1101
- virtual ~CodeEventHandler ();
1102
-
1103
- virtual void Handle (CodeEvent* code_event) = 0;
1104
-
1105
- void Enable ();
1106
- void Disable ();
1107
-
1108
- private:
1109
- CodeEventHandler ();
1110
- CodeEventHandler (const CodeEventHandler&);
1111
- CodeEventHandler& operator =(const CodeEventHandler&);
1112
- void * internal_listener_;
1113
- };
1114
1012
1115
1013
} // namespace v8
1116
1014
0 commit comments