Skip to content

Commit ded9fcb

Browse files
committed
Revert "Merge pull request #4331 from DataDog/ivoanjo/prof-9476-managed-string-storage-try2"
This reverts commit 744c421, reversing changes made to e9adecb.
1 parent 44bf190 commit ded9fcb

15 files changed

+521
-404
lines changed

benchmarks/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
1. Use one of the following prefixes:
66

77
- `library_`
8-
- `profiler_`
8+
- `profiling_`
99
- `tracing_`
1010

1111
2. Add the new file to `run_all.sh` in this directory.
@@ -14,7 +14,7 @@
1414
`validate_benchmarks_spec.rb` as follows:
1515

1616
- `library_` prefix: `spec/validate_benchmarks_spec.rb`
17-
- `profiler_` prefix: `./spec/datadog/profiling/validate_benchmarks_spec.rb`
17+
- `profiling_` prefix: `./spec/datadog/profiling/validate_benchmarks_spec.rb`
1818
- `tracing_` prefix: `./spec/datadog/tracing/validate_benchmarks_spec.rb`
1919

2020
## Adding Benchmarks For a New Product

benchmarks/profiler_string_storage_intern.rb

-66
This file was deleted.

benchmarks/run_all.sh

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ for file in \
1616
`dirname "$0"`/profiler_sample_loop_v2.rb \
1717
`dirname "$0"`/profiler_sample_serialize.rb \
1818
`dirname "$0"`/profiler_sample_gvl.rb \
19-
`dirname "$0"`/profiler_string_storage_intern.rb \
2019
`dirname "$0"`/tracing_trace.rb;
2120
do
2221
bundle exec ruby "$file"

ext/datadog_profiling_native_extension/collectors_thread_context.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ static per_thread_context *get_or_create_context_for(VALUE thread, thread_contex
10241024
if (st_lookup(state->hash_map_per_thread_context, (st_data_t) thread, &value_context)) {
10251025
thread_context = (per_thread_context*) value_context;
10261026
} else {
1027-
thread_context = calloc(1, sizeof(per_thread_context)); // See "note on calloc vs ruby_xcalloc use" in heap_recorder.c
1027+
thread_context = ruby_xcalloc(1, sizeof(per_thread_context));
10281028
initialize_context(thread, thread_context, state);
10291029
st_insert(state->hash_map_per_thread_context, (st_data_t) thread, (st_data_t) thread_context);
10301030
}
@@ -1123,7 +1123,7 @@ static void initialize_context(VALUE thread, per_thread_context *thread_context,
11231123

11241124
static void free_context(per_thread_context* thread_context) {
11251125
sampling_buffer_free(thread_context->sampling_buffer);
1126-
free(thread_context); // See "note on calloc vs ruby_xcalloc use" in heap_recorder.c
1126+
ruby_xfree(thread_context);
11271127
}
11281128

11291129
static VALUE _native_inspect(DDTRACE_UNUSED VALUE _self, VALUE collector_instance) {

0 commit comments

Comments
 (0)