dtrace-provider
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -6,2 +6,9 @@ dtrace-provider - Changes | ||
* 0.2.5: | ||
Add "json" probe argument type, automatically serialising objects as JSON | ||
Trust npm to set PATH appropriately when invoking node (reported by Dave Pacheco) | ||
libusdt update - allow provider memory to be freed (reported by Bryan Cantrill) | ||
Build libusdt with gmake by default (reported by Keith Wesolowski) | ||
Turn the various scripts in test/ into a TAP-based testsuite. | ||
* 0.2.4: | ||
@@ -8,0 +15,0 @@ Improve Node architecture detection to support 0.6.x, and respect |
{ | ||
"name" : "dtrace-provider", | ||
"version" : "0.2.4", | ||
"description" : "Native DTrace providers for node.js applications", | ||
"keywords" : ["dtrace"], | ||
"homepage" : "https://github.com/chrisa/node-dtrace-provider#readme", | ||
"author" : { "name" : "Chris Andrews", "email": "chris@nodnol.org" }, | ||
"main" : "./dtrace-provider.js", | ||
"repository" : { "type" : "git", "url" : "http://github.com/chrisa/node-dtrace-provider.git" }, | ||
"engines": { "node" : ">=0.6" } | ||
"name" : "dtrace-provider", | ||
"version" : "0.2.5", | ||
"description" : "Native DTrace providers for node.js applications", | ||
"keywords" : ["dtrace"], | ||
"homepage" : "https://github.com/chrisa/node-dtrace-provider#readme", | ||
"author" : { | ||
"name" : "Chris Andrews", | ||
"email": "chris@nodnol.org" | ||
}, | ||
"repository" : { | ||
"type" : "git", | ||
"url" : "http://github.com/chrisa/node-dtrace-provider.git" | ||
}, | ||
"engines" : { | ||
"node" : ">=0.6" | ||
}, | ||
"devDependencies": { | ||
"tap": ">=0.2.0", | ||
"execSync": ">=0.0.1" | ||
}, | ||
"main" : "./dtrace-provider.js" | ||
} |
@@ -70,2 +70,26 @@ # dtrace-provider - Native DTrace providers for Node.js apps. | ||
Available argument types are "int", for integer numeric values, | ||
"char *" for strings, and "json" for objects rendered into JSON strings. | ||
Arguments typed as "json" will be created as "char *" probes in | ||
DTrace, but objects passed to these probe arguments will be | ||
automatically serialized to JSON before being passed to DTrace. This | ||
feature is best used in conjunction with the json() D subroutine, but | ||
is available whether or not the platform supports it. | ||
# create a json probe: | ||
var dtp = d.createDTraceProvider("nodeapp"); | ||
var p1 = dtp.addProbe("j1", "json"); | ||
dtp.enable(); | ||
p1.fire(function() { return { "foo" => "bar" }; }); | ||
# on a platform supporting json(): | ||
$ sudo dtrace -Z -n 'nodeapp*:::j1{ this->j = copyinstr(arg0); \ | ||
trace(json(this->j, "foo")) }' | ||
dtrace: description 'nodeapp$target:::j1' matched 0 probes | ||
CPU ID FUNCTION:NAME | ||
0 68712 j1:j1 bar | ||
## PLATFORM SUPPORT | ||
@@ -88,8 +112,2 @@ | ||
## LIMITATIONS | ||
The data types supported are "int" and "char *". Support for | ||
structured types is planned, depending on support from the host DTrace | ||
implementation for the necessary translators. | ||
## CAVEATS | ||
@@ -112,2 +130,7 @@ | ||
## RUNNING THE TESTS | ||
$ npm install | ||
$ sudo ./node_modules/.bin/tap --tap test/*.test.js | ||
## OTHER IMPLEMENTATIONS | ||
@@ -114,0 +137,0 @@ |
@@ -1,8 +0,14 @@ | ||
// node --expose_gc ... | ||
// expected output: | ||
// | ||
// $ sudo dtrace -Zn 'nodeapp*:::gcprobe{ trace(arg0); }' -c 'node --expose_gc test/gc.js' | ||
// Dtrace: description 'nodeapp*:::gcprobe' matched 0 probes | ||
// dtrace: pid 66257 has exited | ||
// CPU ID FUNCTION:NAME | ||
// 1 1778 gcprobe:gcprobe 4320227343 | ||
var d = require('../dtrace-provider'); | ||
var dtp = d.createDTraceProvider("testlibusdt"); | ||
var dtp = d.createDTraceProvider("nodeapp"); | ||
// don't assign the returned probe object anywhere | ||
dtp.addProbe("gcprobe"); | ||
dtp.addProbe("gcprobe", "int"); | ||
dtp.enable(); | ||
@@ -9,0 +15,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
103423
64
613
138
2
3
3