mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
build,src: add Intel Vtune profiling support
This feature supports the Intel Vtune profiling support for JITted JavaScript on IA32 / X64 / X32 platform. The advantage of this profiling is that the user / developer of NodeJS application can get the detailed profiling information for every line of the JavaScript source code. This information will be very useful for the owner to optimize their applications. This feature is a compile-time option. For windows platform, the user needs to pass the following parameter to vcbuild.bat: "enable-vtune" For other OS, the user needs to pass the following parameter to ./configure command: "--enable-vtune-profiling" PR-URL: https://github.com/nodejs/node/pull/3785 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
1 parent
1f0e8dca8e
commit
ed255abdc1
4 files changed
+37
-2
No files matched your search
@@ -43,6 +43,10 @@
|
||||
#include "v8-profiler.h"
|
||||
#include "zlib.h"
|
||||
|
||||
#ifdef NODE_ENABLE_VTUNE_PROFILING
|
||||
#include "../deps/v8/src/third_party/vtune/v8-vtune.h"
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h> // PATH_MAX
|
||||
#include <locale.h>
|
||||
@@ -4025,6 +4029,9 @@ static void StartNodeInstance(void* arg) {
|
||||
Isolate::CreateParams params;
|
||||
ArrayBufferAllocator* array_buffer_allocator = new ArrayBufferAllocator();
|
||||
params.array_buffer_allocator = array_buffer_allocator;
|
||||
#ifdef NODE_ENABLE_VTUNE_PROFILING
|
||||
params.code_event_handler = vTune::GetVtuneCodeEventHandler();
|
||||
#endif
|
||||
Isolate* isolate = Isolate::New(params);
|
||||
if (track_heap_objects) {
|
||||
isolate->GetHeapProfiler()->StartTrackingHeapObjects(true);
|
||||
|
||||
Reference in new issue
Block a user