Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dtrace-provider

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dtrace-provider - npm Package Compare versions

Comparing version 0.2.8 to 0.3.0

compile.py

15

dtrace-provider.js
var DTraceProvider;
function DTraceProviderStub() {}
DTraceProviderStub.prototype.addProbe = function() {
return {
'fire': function() { }
};
DTraceProviderStub.prototype.addProbe = function(name) {
var p = { 'fire': function () {} };
this[name] = p;
return (p);
};
DTraceProviderStub.prototype.enable = function() {};
DTraceProviderStub.prototype.fire = function() {};
DTraceProviderStub.prototype.disable = function() {};

@@ -25,3 +26,3 @@ var builds = ['Release', 'default', 'Debug'];

process.platform == 'freebsd') {
console.log(e);
console.error(e);
}

@@ -38,4 +39,4 @@ }

if (arguments.length == 2)
return (new DTraceProvider(name, module));
return (new DTraceProvider(name));
return (new exports.DTraceProvider(name, module));
return (new exports.DTraceProvider(name));
};
libusdt
=======
This is "libusdt", an extraction into a C library of the common parts
of ruby-dtrace[1], perl-dtrace[2] and node-dtrace-provider[3].
This is "libusdt", a library for creating DTrace USDT providers.
Those individual language-specific implementations will then become
bindings to this library, rather than containing their own
implementations of DOF generation and probe creation. Other dynamic
language bindings could then easily follow.
The idea here is to allow the specification of a DTrace provider

@@ -30,3 +24,3 @@ dynamically in code and then create the provider at runtime. This

i386 and x86_64, on Solaris-like systems, i386 and x86_64 and on
FreeBSD, x86_64 only (so far).
FreeBSD and Oracle Linux, x86_64 only.

@@ -44,3 +38,3 @@ Is-enabled probes are supported and exposed in the API.

issue with the current state of DTrace generally on FreeBSD: only the
first four arguments work reliably. See:
first five arguments work reliably. See:

@@ -52,13 +46,20 @@ http://wiki.freebsd.org/DTraceTODO

There are experimental Lua bindings available, which are a thin
layer over this library, and should serve as an example of typical use
as a dynamic language extension:
There are various language bindings available:
Lua:
https://github.com/chrisa/lua-usdt
There are also Ruby bindings by Kevin Chan, replacing the provider
implementation in ruby-dtrace:
Ruby (by Kevin Chan):
https://github.com/kevinykchan/ruby-usdt
Node.JS:
https://github.com/chrisa/node-dtrace-provider
Perl:
https://github.com/chrisa/perl-Devel-DTrace-Provider
To Do

@@ -80,6 +81,1 @@ -----

DTrace system.
[1] https://github.com/chrisa/ruby-dtrace
[2] https://github.com/chrisa/perl-dtrace
[3] https://github.com/chrisa/node-dtrace-provider
{
"name" : "dtrace-provider",
"version" : "0.2.8",
"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"
},
"main" : "./dtrace-provider.js"
"name": "dtrace-provider",
"version": "0.3.0",
"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"
},
"dependencies": {
"nan": "~1.3.0"
},
"devDependencies": {
"tap": ">=0.2.0"
},
"scripts": {
"install": "scripts/install.js",
"test": "tap test/*test.js"
},
"main": "./dtrace-provider.js"
}

@@ -84,3 +84,3 @@ # dtrace-provider - Native DTrace providers for Node.js apps.

dtp.enable();
p1.fire(function() { return { "foo" => "bar" }; });
p1.fire(function() { return { "foo": "bar" }; });

@@ -87,0 +87,0 @@ # on a platform supporting json():

@@ -5,9 +5,8 @@ var test = require('tap').test;

if (process.platform == 'sunos') {
var dscript = 'testlibusdt*:::32probe{ printf("%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s\\n", copyinstr((uintptr_t)args[0]), copyinstr((uintptr_t)args[1]), copyinstr((uintptr_t)args[2]), copyinstr((uintptr_t)args[3]), copyinstr((uintptr_t)args[4]), copyinstr((uintptr_t)args[5]), copyinstr((uintptr_t)args[6]), copyinstr((uintptr_t)args[7]), copyinstr((uintptr_t)args[8]), copyinstr((uintptr_t)args[9]), copyinstr((uintptr_t)args[10]), copyinstr((uintptr_t)args[11]), copyinstr((uintptr_t)args[12]), copyinstr((uintptr_t)args[13]), copyinstr((uintptr_t)args[14]), copyinstr((uintptr_t)args[15]), copyinstr((uintptr_t)args[16]), copyinstr((uintptr_t)args[17]), copyinstr((uintptr_t)args[18]), copyinstr((uintptr_t)args[19]), copyinstr((uintptr_t)args[20]), copyinstr((uintptr_t)args[21]), copyinstr((uintptr_t)args[22]), copyinstr((uintptr_t)args[23]), copyinstr((uintptr_t)args[24]), copyinstr((uintptr_t)args[25]), copyinstr((uintptr_t)args[26]), copyinstr((uintptr_t)args[27]), copyinstr((uintptr_t)args[28]), copyinstr((uintptr_t)args[29]), copyinstr((uintptr_t)args[30]), copyinstr((uintptr_t)args[31])); }';
}
if (process.platform == 'darwin') {
var dscript = 'testlibusdt*:::32probe{ printf("%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s\\n", copyinstr((user_addr_t)args[0]), copyinstr((user_addr_t)args[1]), copyinstr((user_addr_t)args[2]), copyinstr((user_addr_t)args[3]), copyinstr((user_addr_t)args[4]), copyinstr((user_addr_t)args[5]), copyinstr((user_addr_t)args[6]), copyinstr((user_addr_t)args[7]), copyinstr((user_addr_t)args[8]), copyinstr((user_addr_t)args[9]), copyinstr((user_addr_t)args[10]), copyinstr((user_addr_t)args[11]), copyinstr((user_addr_t)args[12]), copyinstr((user_addr_t)args[13]), copyinstr((user_addr_t)args[14]), copyinstr((user_addr_t)args[15]), copyinstr((user_addr_t)args[16]), copyinstr((user_addr_t)args[17]), copyinstr((user_addr_t)args[18]), copyinstr((user_addr_t)args[19]), copyinstr((user_addr_t)args[20]), copyinstr((user_addr_t)args[21]), copyinstr((user_addr_t)args[22]), copyinstr((user_addr_t)args[23]), copyinstr((user_addr_t)args[24]), copyinstr((user_addr_t)args[25]), copyinstr((user_addr_t)args[26]), copyinstr((user_addr_t)args[27]), copyinstr((user_addr_t)args[28]), copyinstr((user_addr_t)args[29]), copyinstr((user_addr_t)args[30]), copyinstr((user_addr_t)args[31])); }';
}
else {
var dscript = 'testlibusdt*:::32probe{ printf("%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s\\n", copyinstr((uintptr_t)args[0]), copyinstr((uintptr_t)args[1]), copyinstr((uintptr_t)args[2]), copyinstr((uintptr_t)args[3]), copyinstr((uintptr_t)args[4]), copyinstr((uintptr_t)args[5]), copyinstr((uintptr_t)args[6]), copyinstr((uintptr_t)args[7]), copyinstr((uintptr_t)args[8]), copyinstr((uintptr_t)args[9]), copyinstr((uintptr_t)args[10]), copyinstr((uintptr_t)args[11]), copyinstr((uintptr_t)args[12]), copyinstr((uintptr_t)args[13]), copyinstr((uintptr_t)args[14]), copyinstr((uintptr_t)args[15]), copyinstr((uintptr_t)args[16]), copyinstr((uintptr_t)args[17]), copyinstr((uintptr_t)args[18]), copyinstr((uintptr_t)args[19]), copyinstr((uintptr_t)args[20]), copyinstr((uintptr_t)args[21]), copyinstr((uintptr_t)args[22]), copyinstr((uintptr_t)args[23]), copyinstr((uintptr_t)args[24]), copyinstr((uintptr_t)args[25]), copyinstr((uintptr_t)args[26]), copyinstr((uintptr_t)args[27]), copyinstr((uintptr_t)args[28]), copyinstr((uintptr_t)args[29]), copyinstr((uintptr_t)args[30]), copyinstr((uintptr_t)args[31])); }';
}

@@ -14,0 +13,0 @@ test(

@@ -16,3 +16,3 @@ var test = require('tap').test;

t.notOk(exit_code, 'dtrace exited cleanly');
t.equal(traces.length, 12);
t.equal(traces.length, 11);
traces.sort(function(a, b) { return a - b });

@@ -22,5 +22,4 @@ for (var i = 0; i < 10; i++) {

}
t.equal(traces[11], '42');
}
)
);

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc