-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: per-isolate node report (#130)
PR-URL: #130 Reviewed-BY: hyj1991 <[email protected]>
- Loading branch information
1 parent
c4ced63
commit 391d395
Showing
26 changed files
with
159 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
#include "native_stack.h" | ||
|
||
#include "../../platform/platform.h" | ||
#include "node_report.h" | ||
#include "platform/platform.h" | ||
|
||
namespace xprofiler { | ||
void SetNativeStack(JSONWriter* writer) { PrintNativeStack(writer); } | ||
} // namespace xprofiler | ||
|
||
void NodeReport::SetNativeStack(JSONWriter* writer) { | ||
PrintNativeStack(writer); | ||
} | ||
|
||
} // namespace xprofiler |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,32 @@ | ||
#ifndef _SRC_COMMANDS_REPORT_NODE_REPORT_H | ||
#define _SRC_COMMANDS_REPORT_NODE_REPORT_H | ||
#ifndef XPROFILER_SRC_COMMANDS_REPORT_NODE_REPORT_H | ||
#define XPROFILER_SRC_COMMANDS_REPORT_NODE_REPORT_H | ||
|
||
#include <string> | ||
|
||
#include "library/writer.h" | ||
#include "nan.h" | ||
|
||
namespace xprofiler { | ||
using std::string; | ||
class NodeReport { | ||
class NodeReport final { | ||
public: | ||
NodeReport(); | ||
virtual ~NodeReport(); | ||
static void GetNodeReport(string filepath, string location = "Active Dump", | ||
string message = "Active Dump", | ||
static void GetNodeReport(v8::Isolate* isolate, std::string filepath, | ||
std::string location = "Active Dump", | ||
std::string message = "Active Dump", | ||
bool fatal_error = false); | ||
|
||
private: | ||
NodeReport(v8::Isolate* isolate); | ||
void WriteNodeReport(JSONWriter* writer, std::string location, | ||
std::string message, bool fatal_error); | ||
|
||
void SetUvStatistics(JSONWriter* writer); | ||
void SetSystemStatistics(JSONWriter* writer); | ||
void SetNativeStack(JSONWriter* writer); | ||
void SetJavaScriptStack(JSONWriter* writer, bool fatal_error = false); | ||
void SetHeapStatistics(JSONWriter* writer); | ||
|
||
v8::Isolate* isolate_; | ||
}; | ||
} // namespace xprofiler | ||
|
||
#endif | ||
#endif /* XPROFILER_SRC_COMMANDS_REPORT_NODE_REPORT_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.