memory-profiler 1.1.8 → 1.1.9
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/ext/memory/profiler/events.c +14 -6
- data/lib/memory/profiler/version.rb +1 -1
- data/readme.md +4 -0
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 85589b15e3229992f9afefb5333efebaa07d7e25da717a46b3db5846e14af63d
|
|
4
|
+
data.tar.gz: 82986a841e9964aed258e1d7d94f2af7719f350f517423ca49ffb496237e497c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ed056829d3a27ca9b2cc681107a7254e798338c77bbe539f91332d915be126665a19550c5533db8fe751531f12c66963cdfe692232d3f5d3a5f409dd66e31cab
|
|
7
|
+
data.tar.gz: cd44bca86e0db7a75413492a694dad3d202359f6cbe2d386ff71dd08d74adcc13557181565694679d3da1978c58664beff442b54e3a4b2512ef83d16cf96fce8
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -14,6 +14,9 @@ enum {
|
|
|
14
14
|
|
|
15
15
|
// Internal structure for the global event queue system.
|
|
16
16
|
struct Memory_Profiler_Events {
|
|
17
|
+
// The VALUE wrapper for this struct (needed for write barriers).
|
|
18
|
+
VALUE self;
|
|
19
|
+
|
|
17
20
|
// Global event queue (contains events from all Capture instances).
|
|
18
21
|
struct Memory_Profiler_Queue queue;
|
|
19
22
|
|
|
@@ -43,7 +46,10 @@ static const rb_data_type_t Memory_Profiler_Events_type = {
|
|
|
43
46
|
// Create and initialize the global event queue system.
|
|
44
47
|
static VALUE Memory_Profiler_Events_new(void) {
|
|
45
48
|
struct Memory_Profiler_Events *events;
|
|
46
|
-
VALUE
|
|
49
|
+
VALUE self = TypedData_Make_Struct(rb_cObject, struct Memory_Profiler_Events, &Memory_Profiler_Events_type, events);
|
|
50
|
+
|
|
51
|
+
// Store the VALUE wrapper for write barriers:
|
|
52
|
+
events->self = self;
|
|
47
53
|
|
|
48
54
|
// Initialize the global event queue:
|
|
49
55
|
Memory_Profiler_Queue_initialize(&events->queue, sizeof(struct Memory_Profiler_Event));
|
|
@@ -60,7 +66,7 @@ static VALUE Memory_Profiler_Events_new(void) {
|
|
|
60
66
|
rb_raise(rb_eRuntimeError, "Failed to register postponed job!");
|
|
61
67
|
}
|
|
62
68
|
|
|
63
|
-
return
|
|
69
|
+
return self;
|
|
64
70
|
}
|
|
65
71
|
|
|
66
72
|
// Get the global events instance (internal helper).
|
|
@@ -149,10 +155,12 @@ int Memory_Profiler_Events_enqueue(
|
|
|
149
155
|
struct Memory_Profiler_Event *event = Memory_Profiler_Queue_push(&events->queue);
|
|
150
156
|
if (event) {
|
|
151
157
|
event->type = type;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
event->
|
|
155
|
-
event->
|
|
158
|
+
|
|
159
|
+
// Use write barriers when storing VALUEs (required for RUBY_TYPED_WB_PROTECTED):
|
|
160
|
+
RB_OBJ_WRITE(events->self, &event->capture, capture);
|
|
161
|
+
RB_OBJ_WRITE(events->self, &event->klass, klass);
|
|
162
|
+
RB_OBJ_WRITE(events->self, &event->allocations, allocations);
|
|
163
|
+
RB_OBJ_WRITE(events->self, &event->object, object);
|
|
156
164
|
|
|
157
165
|
const char *type_name = (type == MEMORY_PROFILER_EVENT_TYPE_NEWOBJ) ? "NEWOBJ" : "FREEOBJ";
|
|
158
166
|
if (DEBUG) fprintf(stderr, "Queued %s to global queue, size: %zu\n", type_name, events->queue.count);
|
data/readme.md
CHANGED
|
@@ -22,6 +22,10 @@ Please see the [project documentation](https://socketry.github.io/memory-profile
|
|
|
22
22
|
|
|
23
23
|
Please see the [project releases](https://socketry.github.io/memory-profiler/releases/index) for all releases.
|
|
24
24
|
|
|
25
|
+
### v1.1.9
|
|
26
|
+
|
|
27
|
+
- More write barriers...
|
|
28
|
+
|
|
25
29
|
### v1.1.8
|
|
26
30
|
|
|
27
31
|
- Use single global queue for event handling to avoid incorrect ordering.
|
data/releases.md
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|