@sentry/profiling-node 8.7.0 → 8.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bindings/cpu_profiler.cc +19 -13
- package/lib/sentry_cpu_profiler-darwin-arm64-108.node +0 -0
- package/lib/sentry_cpu_profiler-darwin-arm64-115.node +0 -0
- package/lib/sentry_cpu_profiler-darwin-arm64-127.node +0 -0
- package/lib/sentry_cpu_profiler-darwin-arm64-93.node +0 -0
- package/lib/sentry_cpu_profiler-darwin-x64-108.node +0 -0
- package/lib/sentry_cpu_profiler-darwin-x64-115.node +0 -0
- package/lib/sentry_cpu_profiler-darwin-x64-127.node +0 -0
- package/lib/sentry_cpu_profiler-darwin-x64-93.node +0 -0
- package/lib/sentry_cpu_profiler-linux-arm64-glibc-108.node +0 -0
- package/lib/sentry_cpu_profiler-linux-arm64-glibc-115.node +0 -0
- package/lib/sentry_cpu_profiler-linux-arm64-glibc-127.node +0 -0
- package/lib/sentry_cpu_profiler-linux-arm64-glibc-93.node +0 -0
- package/lib/sentry_cpu_profiler-linux-arm64-musl-108.node +0 -0
- package/lib/sentry_cpu_profiler-linux-arm64-musl-115.node +0 -0
- package/lib/sentry_cpu_profiler-linux-arm64-musl-127.node +0 -0
- package/lib/sentry_cpu_profiler-linux-arm64-musl-93.node +0 -0
- package/lib/sentry_cpu_profiler-linux-x64-glibc-108.node +0 -0
- package/lib/sentry_cpu_profiler-linux-x64-glibc-115.node +0 -0
- package/lib/sentry_cpu_profiler-linux-x64-glibc-127.node +0 -0
- package/lib/sentry_cpu_profiler-linux-x64-glibc-93.node +0 -0
- package/lib/sentry_cpu_profiler-linux-x64-musl-108.node +0 -0
- package/lib/sentry_cpu_profiler-linux-x64-musl-115.node +0 -0
- package/lib/sentry_cpu_profiler-linux-x64-musl-127.node +0 -0
- package/lib/sentry_cpu_profiler-linux-x64-musl-93.node +0 -0
- package/lib/sentry_cpu_profiler-win32-x64-108.node +0 -0
- package/lib/sentry_cpu_profiler-win32-x64-115.node +0 -0
- package/lib/sentry_cpu_profiler-win32-x64-127.node +0 -0
- package/lib/sentry_cpu_profiler-win32-x64-93.node +0 -0
- package/package.json +5 -5
package/bindings/cpu_profiler.cc
CHANGED
|
@@ -76,7 +76,8 @@ public:
|
|
|
76
76
|
MeasurementsTicker(uv_loop_t *loop)
|
|
77
77
|
: period_ms(100), isolate(v8::Isolate::GetCurrent()) {
|
|
78
78
|
uv_timer_init(loop, &timer);
|
|
79
|
-
timer
|
|
79
|
+
uv_handle_set_data(reinterpret_cast<uv_handle_t *>(&timer), this);
|
|
80
|
+
uv_unref(reinterpret_cast<uv_handle_t *>(&timer));
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
static void ticker(uv_timer_t *);
|
|
@@ -196,6 +197,10 @@ void MeasurementsTicker::cpu_callback() {
|
|
|
196
197
|
};
|
|
197
198
|
|
|
198
199
|
void MeasurementsTicker::ticker(uv_timer_t *handle) {
|
|
200
|
+
if (handle == nullptr) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
|
|
199
204
|
MeasurementsTicker *self = static_cast<MeasurementsTicker *>(handle->data);
|
|
200
205
|
self->heap_callback();
|
|
201
206
|
self->cpu_callback();
|
|
@@ -323,18 +328,6 @@ void SentryProfile::Start(Profiler *profiler) {
|
|
|
323
328
|
status = ProfileStatus::kStarted;
|
|
324
329
|
}
|
|
325
330
|
|
|
326
|
-
static void CleanupSentryProfile(Profiler *profiler,
|
|
327
|
-
SentryProfile *sentry_profile,
|
|
328
|
-
const std::string &profile_id) {
|
|
329
|
-
if (sentry_profile == nullptr) {
|
|
330
|
-
return;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
sentry_profile->Stop(profiler);
|
|
334
|
-
profiler->active_profiles.erase(profile_id);
|
|
335
|
-
delete sentry_profile;
|
|
336
|
-
};
|
|
337
|
-
|
|
338
331
|
v8::CpuProfile *SentryProfile::Stop(Profiler *profiler) {
|
|
339
332
|
// Stop the CPU Profiler
|
|
340
333
|
v8::CpuProfile *profile = profiler->cpu_profiler->StopProfiling(
|
|
@@ -376,6 +369,18 @@ const uint16_t &SentryProfile::cpu_usage_write_index() const {
|
|
|
376
369
|
return cpu_write_index;
|
|
377
370
|
};
|
|
378
371
|
|
|
372
|
+
static void CleanupSentryProfile(Profiler *profiler,
|
|
373
|
+
SentryProfile *sentry_profile,
|
|
374
|
+
const std::string &profile_id) {
|
|
375
|
+
if (sentry_profile == nullptr) {
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
sentry_profile->Stop(profiler);
|
|
380
|
+
profiler->active_profiles.erase(profile_id);
|
|
381
|
+
delete sentry_profile;
|
|
382
|
+
};
|
|
383
|
+
|
|
379
384
|
#ifdef _WIN32
|
|
380
385
|
static const char kPlatformSeparator = '\\';
|
|
381
386
|
static const char kWinDiskPrefix = ':';
|
|
@@ -1049,6 +1054,7 @@ void FreeAddonData(napi_env env, void *data, void *hint) {
|
|
|
1049
1054
|
|
|
1050
1055
|
if (profiler->cpu_profiler != nullptr) {
|
|
1051
1056
|
profiler->cpu_profiler->Dispose();
|
|
1057
|
+
profiler->cpu_profiler = nullptr;
|
|
1052
1058
|
}
|
|
1053
1059
|
|
|
1054
1060
|
delete profiler;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/profiling-node",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.8.0",
|
|
4
4
|
"description": "Official Sentry SDK for Node.js Profiling",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/profiling-node",
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
"test": "cross-env SENTRY_PROFILER_BINARY_DIR=lib jest --config jest.config.js"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@sentry/core": "8.
|
|
81
|
-
"@sentry/node": "8.
|
|
82
|
-
"@sentry/types": "8.
|
|
83
|
-
"@sentry/utils": "8.
|
|
80
|
+
"@sentry/core": "8.8.0",
|
|
81
|
+
"@sentry/node": "8.8.0",
|
|
82
|
+
"@sentry/types": "8.8.0",
|
|
83
|
+
"@sentry/utils": "8.8.0",
|
|
84
84
|
"detect-libc": "^2.0.2",
|
|
85
85
|
"node-abi": "^3.61.0"
|
|
86
86
|
},
|