Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remove unsued char*, better docs on --profile-cpu
  • Loading branch information
bmeck committed Aug 12, 2015
commit 4343fdf4cc5eab87f1182c26ba856fca15187460
2 changes: 1 addition & 1 deletion doc/iojs.1
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ and servers.

--track-heap-objects track heap object allocations for heap snapshots

--profile-cpu begin cpu profiling during start up
--profile-cpu silently begin cpu profiler during start up

--v8-options print v8 command line options

Expand Down
6 changes: 3 additions & 3 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ static bool abort_on_uncaught_exception = false;
static bool trace_sync_io = false;
static bool track_heap_objects = false;
static bool profile_cpu = false;
static const char* profile_title = "";
static const char* eval_string = nullptr;
static unsigned int preload_module_count = 0;
static const char** preload_modules = nullptr;
Expand Down Expand Up @@ -3107,7 +3106,7 @@ static void PrintHelp() {
" is detected after the first tick\n"
" --track-heap-objects track heap object allocations for heap "
"snapshots\n"
" --profile-cpu being cpu profiling during start up\n"
" --profile-cpu silently begin cpu profiler during start up\n"
" --v8-options print v8 command line options\n"
#if defined(NODE_HAVE_I18N_SUPPORT)
" --icu-data-dir=dir set ICU data load path to dir\n"
Expand Down Expand Up @@ -3943,8 +3942,9 @@ static void StartNodeInstance(void* arg) {
Local<Context> context = Context::New(isolate);

// CpuProfiler requires HandleScope
// addons can pick up the results with StopProfiling(...) using same title
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please capitalize and punctuate the comment.

if (profile_cpu) {
isolate->GetCpuProfiler()->StartProfiling(String::NewFromUtf8(isolate, profile_title), true);
isolate->GetCpuProfiler()->StartProfiling(String::Empty(isolate), true);
}

Environment* env = CreateEnvironment(isolate, context, instance_data);
Expand Down