Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial work porting native diagnostic event pipe library to C library potentially shared between runtimes. #34600

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/mono/cmake/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1647,6 +1647,9 @@
/* Enable private types checked build */
#cmakedefine ENABLE_CHECKED_BUILD_CRASH_REPORTING 1

/* Enable EventPipe library support */
#cmakedefine ENABLE_PERFTRACING 1

/* Define to 1 if you have /usr/include/malloc.h. */
#cmakedefine HAVE_USR_INCLUDE_MALLOC_H 1

Expand Down
10 changes: 10 additions & 0 deletions src/mono/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,16 @@ if test x$with_core = xonly; then
fi
AM_CONDITIONAL(ENABLE_NETCORE, test x$with_core = xonly)

if test x$with_core = xonly; then
if test -f $srcdir/mono/eventpipe/ep.h; then
enable_perftracing=yes
fi
if test x$enable_perftracing = xyes; then
AC_DEFINE(ENABLE_PERFTRACING,1,[Enables support for eventpipe library])
fi
fi
AM_CONDITIONAL(ENABLE_PERFTRACING, test x$enable_perftracing = xyes)

#
# A sanity check to catch cases where the package was unpacked
# with an ancient tar program (Solaris)
Expand Down
2 changes: 2 additions & 0 deletions src/mono/m4/mono-output.m4
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ AC_DEFUN([AC_MONO_OUTPUT], [
mono/utils/Makefile
mono/metadata/Makefile
mono/zlib/Makefile
mono/eventpipe/Makefile
mono/eventpipe/test/Makefile
mono/arch/Makefile
mono/arch/x86/Makefile
mono/arch/amd64/Makefile
Expand Down
1 change: 1 addition & 0 deletions src/mono/mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@
<ItemGroup>
<_MonoBuildParams Include="/p:MONO_BUILD_DIR_PREFIX=&quot;&quot;$(MonoObjDir)&quot;&quot;" />
<_MonoBuildParams Include="/p:MONO_ENABLE_NETCORE=true" />
<_MonoBuildParams Include="/p:MONO_ENABLE_PERFTRACING=true" />
<_MonoBuildParams Include="/p:MONO_USE_STATIC_C_RUNTIME=true" />
<_MonoBuildParams Include="/p:CL_MPCount=$([System.Environment]::ProcessorCount)" />
<_MonoBuildParams Include="/v:minimal" />
Expand Down
17 changes: 13 additions & 4 deletions src/mono/mono/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@ native_dirs = native
endif

if ENABLE_NETCORE
btls_dirs =
btls_dirs =
managed_unit_test_dirs =
native_unit_test_dirs =
else
managed_unit_test_dirs = tests
native_unit_test_dirs = unit-tests
endif

if ENABLE_PERFTRACING
eventpipe_dirs = eventpipe
endif

if ENABLE_NETCORE
SUBDIRS = eglib arch utils sgen zlib metadata mini profiler
SUBDIRS = eglib arch utils sgen zlib $(eventpipe_dirs) metadata mini profiler $(native_unit_test_dirs)
else

if CROSS_COMPILING
Expand All @@ -26,9 +35,9 @@ else
if INSTALL_MONOTOUCH
SUBDIRS = $(btls_dirs) eglib arch utils zlib $(sgen_dirs) metadata mini profiler $(native_dirs)
else
SUBDIRS = $(btls_dirs) eglib arch utils cil zlib $(sgen_dirs) metadata mini dis tests unit-tests benchmark profiler $(native_dirs)
SUBDIRS = $(btls_dirs) eglib arch utils cil zlib $(sgen_dirs) metadata mini dis $(managed_unit_test_dirs) $(native_unit_test_dirs) benchmark profiler $(native_dirs)
endif
endif
endif

DIST_SUBDIRS = btls native eglib arch utils cil zlib $(sgen_dirs) metadata mini dis tests unit-tests benchmark profiler
DIST_SUBDIRS = btls native eglib arch utils cil zlib $(sgen_dirs) metadata mini dis $(managed_unit_test_dirs) $(native_unit_test_dirs) benchmark profiler
71 changes: 71 additions & 0 deletions src/mono/mono/eventpipe/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules

if !ENABLE_MSVC_ONLY
if ENABLE_PERFTRACING

AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(GLIB_CFLAGS) $(SHARED_CFLAGS)

noinst_LTLIBRARIES = libeventpipe.la

eventpipe_sources = \
ep.c \
ep.h \
ep-block.c \
ep-block.h \
ep-block-internals.c \
ep-buffer.h \
ep-buffer-manager.c \
ep-buffer-manager.h \
ep-buffer-manager-internals.c \
ep-config.c \
ep-config.h \
ep-config-internals.c \
ep-event.h \
ep-event-instance.h \
ep-event-instance.c \
ep-event-instance-internals.c \
ep-event-internals.c \
ep-event-payload-internals.c \
ep-event-payload.h \
ep-event-source.c \
ep-event-source.h \
ep-event-source-internals.c \
ep-file.c \
ep-file.h \
ep-file-internals.c \
ep-internals.c \
ep-metadata-generator.c \
ep-metadata-generator.h \
ep-metadata-generator-internals.c \
ep-provider.c \
ep-provider.h \
ep-provider-internals.c \
ep-rt.h \
ep-rt-config.h \
ep-rt-config-mono.h \
ep-rt-mono.c \
ep-rt-mono.h \
ep-rt-types.h \
ep-rt-types-mono.h \
ep-thread.c \
ep-thread.h \
ep-thread-internals.c \
ep-types.h \
ep-session.c \
ep-session.h \
ep-session-internals.c \
ep-session-provider.c \
ep-session-provider-internals.h \
ep-session-provider-internals.c \
ep-stream.c \
ep-stream.h \
ep-stream-internals.c \
ep-stack-contents.h


libeventpipe_la_SOURCES = $(eventpipe_sources)

endif # ENABLE_PERFTRACING
endif # !ENABLE_MSVC_ONLY

CFLAGS := $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@) @CXX_ADD_CFLAGS@
Loading