Skip to content

Commit da3cfad

Browse files
committed
fixup! inspector: implement --heap-prof
1 parent 5e3c173 commit da3cfad

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

doc/api/cli.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ added: REPLACEME
292292
> Stability: 1 - Experimental
293293
294294
Specify the average sampling interval in bytes for the heap profiles generated
295-
by `--heap-prof`. The default is 32 * 1024 bytes.
295+
by `--heap-prof`. The default is 512 * 1024 bytes.
296296

297297
### `--heap-prof-name`
298298
<!-- YAML

doc/node.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ will be placed.
158158
The average sampling interval in bytes for the heap profiles generated by
159159
.Fl -heap-prof .
160160
The default is
161-
.Sy 32 * 1024 .
161+
.Sy 512 * 1024 .
162162
.
163163
.It Fl -heap-prof-name
164164
File name of the V8 heap profile generated with

src/inspector_profiler.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class V8HeapProfilerConnection : public V8ProfilerConnection {
115115
void Start() override;
116116
void End() override;
117117

118-
const char* type() const override { return type_.c_str(); }
118+
const char* type() const override { return "heap"; }
119119
bool ending() const override { return ending_; }
120120

121121
std::string GetDirectory() const override;
@@ -125,7 +125,6 @@ class V8HeapProfilerConnection : public V8ProfilerConnection {
125125
private:
126126
std::unique_ptr<inspector::InspectorSession> session_;
127127
bool ending_ = false;
128-
std::string type_ = "heap";
129128
};
130129

131130
} // namespace profiler

src/node_options.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
407407
&EnvironmentOptions::heap_prof_dir);
408408
AddOption("--heap-prof-interval",
409409
"specified sampling interval in bytes for the V8 heap "
410-
"profile generated with --heap-prof. (default: 32 * 1024)",
410+
"profile generated with --heap-prof. (default: 512 * 1024)",
411411
&EnvironmentOptions::heap_prof_interval);
412412
#endif // HAVE_INSPECTOR
413413
AddOption("--redirect-warnings",

src/node_options.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class EnvironmentOptions : public Options {
118118
bool cpu_prof = false;
119119
std::string heap_prof_dir;
120120
std::string heap_prof_name;
121-
static const uint64_t kDefaultHeapProfInterval = 32 * 1024;
121+
static const uint64_t kDefaultHeapProfInterval = 512 * 1024;
122122
uint64_t heap_prof_interval = kDefaultHeapProfInterval;
123123
bool heap_prof = false;
124124
#endif // HAVE_INSPECTOR

0 commit comments

Comments
 (0)