Skip to content

Commit

Permalink
changes to common EP source
Browse files Browse the repository at this point in the history
  • Loading branch information
LakshanF committed Jan 9, 2023
1 parent fe8252c commit 4b9e103
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/native/eventpipe/ds-ipc-pal-namedpipe.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef __DIAGNOSTICS_IPC_PAL_NAMEDPIPE_H__
#define __DIAGNOSTICS_IPC_PAL_NAMEDPIPE_H__

#undef __AOT_WINDOWS_DEF_NOT_NEEDED___
#define __AOT_WINDOWS_DEF_NOT_NEEDED___

#include "ds-rt-config.h"

#ifdef ENABLE_PERFTRACING
Expand Down
4 changes: 3 additions & 1 deletion src/native/eventpipe/ep-json-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ ep_json_file_write_event_data (
json_file_write_string (json_file, buffer);
}

characters_written = ep_rt_utf8_string_snprintf (buffer, ARRAY_SIZE (buffer), "\"Thread (%" PRIu64 ")\"]},", ep_rt_thread_id_t_to_uint64_t (thread_id));
// TODO: AOT Event Port, PRIu64 changed to
//characters_written = ep_rt_utf8_string_snprintf (buffer, ARRAY_SIZE (buffer), "\"Thread (%" PRIu64 ")\"]},", ep_rt_thread_id_t_to_uint64_t (thread_id));
characters_written = ep_rt_utf8_string_snprintf (buffer, ARRAY_SIZE (buffer), "\"%lu\",\n]},", ep_rt_thread_id_t_to_uint64_t (thread_id));
if (characters_written > 0 && characters_written < (int32_t)ARRAY_SIZE (buffer))
json_file_write_string (json_file, buffer);
}
Expand Down
31 changes: 28 additions & 3 deletions src/native/eventpipe/ep-rt-config.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef __EVENTPIPE_RT_CONFIG_H__
#define __EVENTPIPE_RT_CONFIG_H__

#include "ep-shared-config.h"
#include <ep-shared-config.h>

#ifndef FEATURE_CORECLR
#if !defined(FEATURE_CORECLR) && !defined(FEATURE_NATIVEAOT)

#include <config.h>

Expand All @@ -16,7 +16,7 @@
#define DS_RT_H <mono/eventpipe/ds-rt-mono.h>
#define DS_RT_TYPES_H <mono/eventpipe/ds-rt-types-mono.h>

#else /* !FEATURE_CORECLR */
#elif defined(FEATURE_CORECLR)

#ifndef EP_NO_RT_DEPENDENCY
#include "common.h"
Expand All @@ -43,6 +43,31 @@
#define DS_RT_H "ds-rt-coreclr.h"
#define DS_RT_TYPES_H "ds-rt-types-coreclr.h"

#elif defined(FEATURE_NATIVEAOT)

#ifndef EP_NO_RT_DEPENDENCY
#include "common.h"
#endif

#if defined(FEATURE_PERFTRACING)
#define ENABLE_PERFTRACING
#endif

#ifdef TARGET_WINDOWS
#define HOST_WIN32
#endif

#if defined(FEATURE_PERFTRACING) && defined(FEATURE_PROFAPI_ATTACH_DETACH) && defined(DACCESS_COMPILE)
#undef FEATURE_PROFAPI_ATTACH_DETACH
#endif

#define EP_RT_H <eventpipe/ep-rt-aot.h>
#define EP_RT_TYPES_H <eventpipe/ep-rt-types-aot.h>
#define EP_RT_CONFIG_H <eventpipe/ep-rt-config-aot.h>

#define DS_RT_H <eventpipe/ds-rt-aot.h>
#define DS_RT_TYPES_H <eventpipe/ds-rt-types-aot.h>

#endif

#ifndef EP_NO_RT_DEPENDENCY
Expand Down

0 comments on commit 4b9e103

Please sign in to comment.