Skip to content

Commit

Permalink
Fix build errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
lateralusX committed Feb 20, 2023
1 parent 03febcf commit dec556c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/native/eventpipe/ds-eventpipe-protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,11 @@ eventpipe_collect_tracing_command_try_parse_config (
ep_char8_t *provider_name_utf8 = NULL;
ep_char8_t *filter_data_utf8 = NULL;

dn_vector_custom_alloc_params_t params = DN_VECTOR_DEFAULT_ALLOC_PARAMS_T (EventPipeProviderConfiguration);

ep_raise_error_if_nok (ds_ipc_message_try_parse_uint32_t (buffer, buffer_len, &count_configs));
ep_raise_error_if_nok (count_configs <= max_count_configs);

dn_vector_custom_alloc_params_t params = DN_VECTOR_DEFAULT_ALLOC_PARAMS_T (EventPipeProviderConfiguration);
params.capacity = count_configs;

*result = dn_vector_custom_alloc (&params);
Expand Down
2 changes: 0 additions & 2 deletions src/native/eventpipe/ep-buffer-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -1337,10 +1337,8 @@ ep_buffer_manager_write_all_buffers_to_file_v4 (
// This may be the last reference to a given EventPipeThread, so make a ref to keep it around till we're done
EventPipeThreadHolder thread_holder;
if (ep_thread_holder_init (&thread_holder, ep_thread_session_state_get_thread (thread_session_state))) {

ep_rt_spin_lock_handle_t *thread_lock = ep_thread_get_rt_lock_ref (ep_thread_holder_get_thread (&thread_holder));
EP_SPIN_LOCK_ENTER (thread_lock, section5)

EP_ASSERT(ep_rt_volatile_load_uint32_t_without_barrier (ep_thread_get_unregistered_ref (ep_thread_session_state_get_thread (thread_session_state))) > 0);
ep_thread_delete_session_state (ep_thread_session_state_get_thread (thread_session_state), ep_thread_session_state_get_session (thread_session_state));
EP_SPIN_LOCK_EXIT (thread_lock, section5)
Expand Down
10 changes: 5 additions & 5 deletions src/native/eventpipe/ep-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ ep_file_alloc (
StreamWriter *stream_writer,
EventPipeSerializationFormat format)
{
dn_umap_custom_alloc_params_t params = DN_UMAP_DEFAULT_ALLOC_PARAMS;
params.hash_func = stack_hash_key_hash_func;
params.equal_func = stack_hash_key_equal_func;
params.value_dispose_func = stack_hash_value_free_func;

EventPipeFile *instance = ep_rt_object_alloc (EventPipeFile);
ep_raise_error_if_nok (instance != NULL);

Expand Down Expand Up @@ -349,11 +354,6 @@ ep_file_alloc (
instance->metadata_ids = dn_umap_alloc ();
ep_raise_error_if_nok (instance->metadata_ids != NULL);

dn_umap_custom_alloc_params_t params = DN_UMAP_DEFAULT_ALLOC_PARAMS;
params.hash_func = stack_hash_key_hash_func;
params.equal_func = stack_hash_key_equal_func;
params.value_dispose_func = stack_hash_value_free_func;

instance->stack_hash = dn_umap_custom_alloc (&params);
ep_raise_error_if_nok (instance->stack_hash != NULL);

Expand Down
2 changes: 2 additions & 0 deletions src/native/eventpipe/ep-provider.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ provider_refresh_all_events (EventPipeProvider *provider)

ep_requires_lock_held ();

EP_ASSERT (provider->event_list != NULL);

DN_LIST_FOREACH_BEGIN (provider->event_list, EventPipeEvent *, current_event) {
provider_refresh_event_state (current_event);
} DN_LIST_FOREACH_END;
Expand Down

0 comments on commit dec556c

Please sign in to comment.