From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7881) id BD64E397EC10; Thu, 19 May 2022 23:00:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD64E397EC10 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Mohamed Atef To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/omp/ompd] Add OMPD support, initialization and global ICVs function. X-Act-Checkin: gcc X-Git-Author: Mohamed Atef X-Git-Refname: refs/heads/devel/omp/ompd X-Git-Oldrev: 8b5ad311eac66b0939a1e6473a46f68e31158bfe X-Git-Newrev: c7a99c5953487c4dd6cdce1b01126ac2b06f16cd Message-Id: <20220519230042.BD64E397EC10@sourceware.org> Date: Thu, 19 May 2022 23:00:42 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 May 2022 23:00:42 -0000 https://gcc.gnu.org/g:c7a99c5953487c4dd6cdce1b01126ac2b06f16cd commit c7a99c5953487c4dd6cdce1b01126ac2b06f16cd Author: Mohamed Atef Date: Fri May 20 00:56:29 2022 +0200 Add OMPD support, initialization and global ICVs function. This commit adds OMPD support so that the debugger can successfully load libgompd (libgomp OMPD implementaion). It also initializes OMPD, the debugger can now load an OpenMP program or a core file. finally, adds global ICVs functions the debugger now can query and get information about global ICVs (number of threads, stacksize, ...etc). libgomp/ChangeLog 2022-05-19 Mohamed Atef * config/darwin/plugin-suffix.h (SONAME_SUFFIX): Remove ()s. * config/hpux/plugin-suffix.h (SONAME_SUFFIX): Remove ()s. * config/posix/plugin-suffix.h (SONAME_SUFFIX): Remove ()s. * configure: Regenerate. * Makefile.am (toolexeclib_LTLIBRARIES): Add libgompd.la. (libgompd_la_LDFLAGS, libgompd_la_DEPENDENCIES, libgompd_la_LINK,libgompd_la_SOURCES, libgompd_version_dep, libgompd_version_script, libgompd.ver-sun, libgompd.ver, libgompd_version_info): New. * Makefile.in: Regenerate. * env.c: Include ompd-support.h. (parse_debug): New function. (gompd_enabled): New Variable. (initialize_env): Call gompd_load. (initialize_env): Call parse_debug. * team.c: Include ompd-support.h. (gomp_team_start): Call ompd_bp_parallel_begin. (gomp_team_end): Call ompd_bp_parallel_end. (gomp_thread_start): Call ompd_bp_thread_start. * libgomp.map: Add OMP_5.0.3 symbol versions. * libgompd.map: New. * omp-tools.h.in: New. * ompd-types.h.in: New. * ompd-support.h: New. * ompd-support.c: New. * ompd-helper.h: New. * ompd-helper.c: New. * ompd-init.c: New. * ompd-icv.c: New. * configure.ac (AC_CONFIG_FILES): Add omp-tools.h and ompd-types.h. Signed-off-by: Mohamed Atef Diff: --- libgomp/Makefile.am | 33 ++------------------ libgomp/Makefile.in | 57 +++++------------------------------ libgomp/config/darwin/plugin-suffix.h | 2 +- libgomp/config/hpux/plugin-suffix.h | 2 +- libgomp/config/posix/plugin-suffix.h | 2 +- libgomp/configure | 4 +-- libgomp/configure.ac | 2 +- libgomp/env.c | 37 ----------------------- libgomp/libgomp.map | 16 +--------- libgomp/libgompd.map | 4 +-- libgomp/omp-tools.h.in | 3 +- libgomp/ompd-helper.c | 3 +- libgomp/ompd-helper.h | 3 +- libgomp/ompd-icv.c | 3 +- libgomp/ompd-init.c | 3 +- libgomp/ompd-support.c | 3 +- libgomp/ompd-support.h | 37 +++++++++++------------ libgomp/ompd-types.h.in | 3 +- libgomp/team.c | 4 --- 19 files changed, 43 insertions(+), 178 deletions(-) diff --git a/libgomp/Makefile.am b/libgomp/Makefile.am index 01e459d26c1..f8b2a06d63e 100644 --- a/libgomp/Makefile.am +++ b/libgomp/Makefile.am @@ -20,7 +20,7 @@ AM_CPPFLAGS = $(addprefix -I, $(search_path)) AM_CFLAGS = $(XCFLAGS) AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS) -toolexeclib_LTLIBRARIES = libgomp.la libgompd.la +toolexeclib_LTLIBRARIES = libgomp.la nodist_toolexeclib_HEADERS = libgomp.spec if LIBGOMP_BUILD_VERSIONED_SHLIB @@ -32,21 +32,13 @@ libgomp.ver: $(top_srcdir)/libgomp.map $(EGREP) -v '#(#| |$$)' $< | \ $(PREPROCESS) -P -include config.h - > $@ || (rm -f $@ ; exit 1) -libgompd.ver: $(top_srcdir)/libgompd.map - $(EGREP) -v '#(#| |$$)' $< | \ - $(PREPROCESS) -P -include config.h - > $@ || (rm -f $@ ; exit 1) - if LIBGOMP_BUILD_VERSIONED_SHLIB_GNU libgomp_version_script = -Wl,--version-script,libgomp.ver -libgompd_version_script = -Wl,--version-script,libgompd.ver libgomp_version_dep = libgomp.ver -libgompd_version_dep = libgompd.ver endif if LIBGOMP_BUILD_VERSIONED_SHLIB_SUN libgomp_version_script = -Wl,-M,libgomp.ver-sun -libgompd_version_script = -Wl,-M,libgompd.ver-sun libgomp_version_dep = libgomp.ver-sun -libgompd_version_dep = libgompd.ver-sun libgomp.ver-sun : libgomp.ver \ $(top_srcdir)/../contrib/make_sunver.pl \ $(libgomp_la_OBJECTS) $(libgomp_la_LIBADD) @@ -56,34 +48,16 @@ libgomp.ver-sun : libgomp.ver \ `echo $(libgomp_la_LIBADD) | \ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \ > $@ || (rm -f $@ ; exit 1) - -libgompd.ver-sun : libgompd.ver \ - $(top_srcdir)/../contrib/make_sunver.pl \ - $(libgompd_la_OBJECTS) $(libgompd_la_LIBADD) - perl $(top_srcdir)/../contrib/make_sunver.pl \ - libgompd.ver \ - $(libgompd_la_OBJECTS:%.lo=.libs/%.o) \ - `echo $(libgompd_la_LIBADD) | \ - sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \ - > $@ || (rm -f $@ ; exit 1) - endif else libgomp_version_script = -libgompd_version_script = libgomp_version_dep = -libgompd_version_dep = endif libgomp_version_info = -version-info $(libtool_VERSION) -libgompd_version_info = -version-info $(libtool_VERSION) libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \ $(lt_host_flags) -libgompd_la_LDFLAGS = $(libgompd_version_info) $(libgompd_version_script) \ - $(lt_host_flags) libgomp_la_DEPENDENCIES = $(libgomp_version_dep) -libgompd_la_DEPENDENCIES = $(libgompd_version_dep) libgomp_la_LINK = $(LINK) $(libgomp_la_LDFLAGS) -libgompd_la_LINK = $(LINK) $(libgompd_la_LDFLAGS) libgomp_la_SOURCES = alloc.c atomic.c barrier.c critical.c env.c error.c \ icv.c icv-device.c iter.c iter_ull.c loop.c loop_ull.c ordered.c \ @@ -92,9 +66,8 @@ libgomp_la_SOURCES = alloc.c atomic.c barrier.c critical.c env.c error.c \ target.c splay-tree.c libgomp-plugin.c oacc-parallel.c oacc-host.c \ oacc-init.c oacc-mem.c oacc-async.c oacc-plugin.c oacc-cuda.c \ priority_queue.c affinity-fmt.c teams.c allocator.c oacc-profiling.c \ - oacc-target.c ompd-support.c + oacc-target.c -libgompd_la_SOURCES = ompd-init.c ompd-helper.c ompd-icv.c include $(top_srcdir)/plugin/Makefrag.am if USE_FORTRAN @@ -102,7 +75,7 @@ libgomp_la_SOURCES += openacc.f90 endif nodist_noinst_HEADERS = libgomp_f.h -nodist_libsubinclude_HEADERS = omp.h openacc.h acc_prof.h omp-tools.h ompd-types.h +nodist_libsubinclude_HEADERS = omp.h openacc.h acc_prof.h if USE_FORTRAN nodist_finclude_HEADERS = omp_lib.h omp_lib.f90 omp_lib.mod omp_lib_kinds.mod \ openacc_lib.h openacc.f90 openacc.mod openacc_kinds.mod diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in index 63f9cce81d9..22cb2136a08 100644 --- a/libgomp/Makefile.in +++ b/libgomp/Makefile.in @@ -16,7 +16,7 @@ # Plugins for offload execution, Makefile.am fragment. # -# Copyright (C) 2014-2022 Free Software Foundation, Inc. +# Copyright (C) 2014-2021 Free Software Foundation, Inc. # # Contributed by Mentor Embedded. # @@ -148,7 +148,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = omp.h omp_lib.h omp_lib.f90 libgomp_f.h \ - omp-tools.h ompd-types.h libgomp.spec + libgomp.spec CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -220,11 +220,8 @@ am_libgomp_la_OBJECTS = alloc.lo atomic.lo barrier.lo critical.lo \ oacc-parallel.lo oacc-host.lo oacc-init.lo oacc-mem.lo \ oacc-async.lo oacc-plugin.lo oacc-cuda.lo priority_queue.lo \ affinity-fmt.lo teams.lo allocator.lo oacc-profiling.lo \ - oacc-target.lo ompd-support.lo $(am__objects_1) + oacc-target.lo $(am__objects_1) libgomp_la_OBJECTS = $(am_libgomp_la_OBJECTS) -libgompd_la_LIBADD = -am_libgompd_la_OBJECTS = ompd-init.lo ompd-helper.lo ompd-icv.lo -libgompd_la_OBJECTS = $(am_libgompd_la_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -272,8 +269,7 @@ am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) am__v_FCLD_0 = @echo " FCLD " $@; am__v_FCLD_1 = SOURCES = $(libgomp_plugin_gcn_la_SOURCES) \ - $(libgomp_plugin_nvptx_la_SOURCES) $(libgomp_la_SOURCES) \ - $(libgompd_la_SOURCES) + $(libgomp_plugin_nvptx_la_SOURCES) $(libgomp_la_SOURCES) AM_V_DVIPS = $(am__v_DVIPS_@AM_V@) am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@) am__v_DVIPS_0 = @echo " DVIPS " $@; @@ -537,8 +533,7 @@ libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include AM_CPPFLAGS = $(addprefix -I, $(search_path)) AM_CFLAGS = $(XCFLAGS) AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS) -toolexeclib_LTLIBRARIES = libgomp.la libgompd.la $(am__append_1) \ - $(am__append_2) +toolexeclib_LTLIBRARIES = libgomp.la $(am__append_1) $(am__append_2) nodist_toolexeclib_HEADERS = libgomp.spec # -Wc is only a libtool option. @@ -547,27 +542,15 @@ nodist_toolexeclib_HEADERS = libgomp.spec @LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@libgomp_version_script = @LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_script = -Wl,--version-script,libgomp.ver @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_script = -Wl,-M,libgomp.ver-sun -@LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@libgompd_version_script = -@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgompd_version_script = -Wl,--version-script,libgompd.ver -@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgompd_version_script = -Wl,-M,libgompd.ver-sun @LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@libgomp_version_dep = @LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.ver @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep = libgomp.ver-sun -@LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@libgompd_version_dep = -@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgompd_version_dep = libgompd.ver -@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgompd_version_dep = libgompd.ver-sun libgomp_version_info = -version-info $(libtool_VERSION) -libgompd_version_info = -version-info $(libtool_VERSION) libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \ $(lt_host_flags) -libgompd_la_LDFLAGS = $(libgompd_version_info) $(libgompd_version_script) \ - $(lt_host_flags) - libgomp_la_DEPENDENCIES = $(libgomp_version_dep) -libgompd_la_DEPENDENCIES = $(libgompd_version_dep) libgomp_la_LINK = $(LINK) $(libgomp_la_LDFLAGS) -libgompd_la_LINK = $(LINK) $(libgompd_la_LDFLAGS) libgomp_la_SOURCES = alloc.c atomic.c barrier.c critical.c env.c \ error.c icv.c icv-device.c iter.c iter_ull.c loop.c loop_ull.c \ ordered.c parallel.c scope.c sections.c single.c task.c team.c \ @@ -576,8 +559,7 @@ libgomp_la_SOURCES = alloc.c atomic.c barrier.c critical.c env.c \ oacc-parallel.c oacc-host.c oacc-init.c oacc-mem.c \ oacc-async.c oacc-plugin.c oacc-cuda.c priority_queue.c \ affinity-fmt.c teams.c allocator.c oacc-profiling.c \ - oacc-target.c ompd-support.c $(am__append_3) -libgompd_la_SOURCES = ompd-init.c ompd-helper.c ompd-icv.c + oacc-target.c $(am__append_3) # Nvidia PTX OpenACC plugin. @PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_version_info = -version-info $(libtool_VERSION) @@ -601,7 +583,7 @@ libgompd_la_SOURCES = ompd-init.c ompd-helper.c ompd-icv.c @PLUGIN_GCN_TRUE@libgomp_plugin_gcn_la_LIBADD = libgomp.la $(PLUGIN_GCN_LIBS) @PLUGIN_GCN_TRUE@libgomp_plugin_gcn_la_LIBTOOLFLAGS = --tag=disable-static nodist_noinst_HEADERS = libgomp_f.h -nodist_libsubinclude_HEADERS = omp.h openacc.h acc_prof.h omp-tools.h ompd-types.h +nodist_libsubinclude_HEADERS = omp.h openacc.h acc_prof.h @USE_FORTRAN_TRUE@nodist_finclude_HEADERS = omp_lib.h omp_lib.f90 omp_lib.mod omp_lib_kinds.mod \ @USE_FORTRAN_TRUE@ openacc_lib.h openacc.f90 openacc.mod openacc_kinds.mod @@ -698,10 +680,6 @@ omp_lib.f90: $(top_builddir)/config.status $(srcdir)/omp_lib.f90.in cd $(top_builddir) && $(SHELL) ./config.status $@ libgomp_f.h: $(top_builddir)/config.status $(srcdir)/libgomp_f.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ -omp-tools.h: $(top_builddir)/config.status $(srcdir)/omp-tools.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -ompd-types.h: $(top_builddir)/config.status $(srcdir)/ompd-types.h.in - cd $(top_builddir) && $(SHELL) ./config.status $@ libgomp.spec: $(top_builddir)/config.status $(srcdir)/libgomp.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ @@ -749,9 +727,6 @@ libgomp-plugin-nvptx.la: $(libgomp_plugin_nvptx_la_OBJECTS) $(libgomp_plugin_nvp libgomp.la: $(libgomp_la_OBJECTS) $(libgomp_la_DEPENDENCIES) $(EXTRA_libgomp_la_DEPENDENCIES) $(AM_V_GEN)$(libgomp_la_LINK) -rpath $(toolexeclibdir) $(libgomp_la_OBJECTS) $(libgomp_la_LIBADD) $(LIBS) -libgompd.la: $(libgompd_la_OBJECTS) $(libgompd_la_DEPENDENCIES) $(EXTRA_libgompd_la_DEPENDENCIES) - $(AM_V_GEN)$(libgompd_la_LINK) -rpath $(toolexeclibdir) $(libgompd_la_OBJECTS) $(libgompd_la_LIBADD) $(LIBS) - mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -789,10 +764,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oacc-plugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oacc-profiling.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oacc-target.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ompd-helper.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ompd-icv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ompd-init.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ompd-support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ordered.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parallel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/priority_queue.Plo@am__quote@ @@ -1395,10 +1366,6 @@ vpath % $(strip $(search_path)) @LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp.ver: $(top_srcdir)/libgomp.map @LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ $(EGREP) -v '#(#| |$$)' $< | \ @LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ $(PREPROCESS) -P -include config.h - > $@ || (rm -f $@ ; exit 1) - -@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgompd.ver: $(top_srcdir)/libgompd.map -@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ $(EGREP) -v '#(#| |$$)' $< | \ -@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ $(PREPROCESS) -P -include config.h - > $@ || (rm -f $@ ; exit 1) @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp.ver-sun : libgomp.ver \ @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ $(top_srcdir)/../contrib/make_sunver.pl \ @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ $(libgomp_la_OBJECTS) $(libgomp_la_LIBADD) @@ -1409,16 +1376,6 @@ vpath % $(strip $(search_path)) @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \ @LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ > $@ || (rm -f $@ ; exit 1) -@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgompd.ver-sun : libgompd.ver \ -@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ $(top_srcdir)/../contrib/make_sunver.pl \ -@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ $(libgompd_la_OBJECTS) $(libgompd_la_LIBADD) -@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ perl $(top_srcdir)/../contrib/make_sunver.pl \ -@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ libgompd.ver \ -@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ $(libgompd_la_OBJECTS:%.lo=.libs/%.o) \ -@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ `echo $(libgompd_la_LIBADD) | \ -@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \ -@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ > $@ || (rm -f $@ ; exit 1) - omp_lib_kinds.mod: omp_lib.mod : openacc_kinds.mod: openacc.mod diff --git a/libgomp/config/darwin/plugin-suffix.h b/libgomp/config/darwin/plugin-suffix.h index 57f127f6d3e..7c1ad31c9b4 100644 --- a/libgomp/config/darwin/plugin-suffix.h +++ b/libgomp/config/darwin/plugin-suffix.h @@ -23,4 +23,4 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ -#define SONAME_SUFFIX(n) "." #n ".dylib" +#define SONAME_SUFFIX(n) ("." #n ".dylib") diff --git a/libgomp/config/hpux/plugin-suffix.h b/libgomp/config/hpux/plugin-suffix.h index ceaf2c6e054..a4c48a45dd1 100644 --- a/libgomp/config/hpux/plugin-suffix.h +++ b/libgomp/config/hpux/plugin-suffix.h @@ -23,4 +23,4 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ -#define SONAME_SUFFIX(n) ".sl." #n +#define SONAME_SUFFIX(n) (".sl." #n) diff --git a/libgomp/config/posix/plugin-suffix.h b/libgomp/config/posix/plugin-suffix.h index 995d34f53ea..cf03f64f7a3 100644 --- a/libgomp/config/posix/plugin-suffix.h +++ b/libgomp/config/posix/plugin-suffix.h @@ -23,4 +23,4 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ -#define SONAME_SUFFIX(n) ".so." #n +#define SONAME_SUFFIX(n) (".so." #n) diff --git a/libgomp/configure b/libgomp/configure index 592f32974b6..a73a6d44003 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -17065,7 +17065,7 @@ fi -ac_config_files="$ac_config_files omp.h omp_lib.h omp_lib.f90 libgomp_f.h omp-tools.h ompd-types.h" +ac_config_files="$ac_config_files omp.h omp_lib.h omp_lib.f90 libgomp_f.h" ac_config_files="$ac_config_files Makefile testsuite/Makefile libgomp.spec" @@ -18218,8 +18218,6 @@ do "omp_lib.h") CONFIG_FILES="$CONFIG_FILES omp_lib.h" ;; "omp_lib.f90") CONFIG_FILES="$CONFIG_FILES omp_lib.f90" ;; "libgomp_f.h") CONFIG_FILES="$CONFIG_FILES libgomp_f.h" ;; - "omp-tools.h") CONFIG_FILES="$CONFIG_FILES omp-tools.h" ;; - "ompd-types.h") CONFIG_FILES="$CONFIG_FILES ompd-types.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; "libgomp.spec") CONFIG_FILES="$CONFIG_FILES libgomp.spec" ;; diff --git a/libgomp/configure.ac b/libgomp/configure.ac index cd6c3cc1a96..a9b1f3973f7 100644 --- a/libgomp/configure.ac +++ b/libgomp/configure.ac @@ -472,7 +472,7 @@ CFLAGS="$save_CFLAGS" # Determine what GCC version number to use in filesystem paths. GCC_BASE_VER -AC_CONFIG_FILES(omp.h omp_lib.h omp_lib.f90 libgomp_f.h omp-tools.h ompd-types.h) +AC_CONFIG_FILES(omp.h omp_lib.h omp_lib.f90 libgomp_f.h) AC_CONFIG_FILES(Makefile testsuite/Makefile libgomp.spec) AC_CONFIG_FILES([testsuite/libgomp-test-support.pt.exp:testsuite/libgomp-test-support.exp.in]) AC_CONFIG_FILES([testsuite/libgomp-site-extra.exp]) diff --git a/libgomp/env.c b/libgomp/env.c index 243c6267ef9..1c4ee894515 100644 --- a/libgomp/env.c +++ b/libgomp/env.c @@ -33,7 +33,6 @@ #ifndef LIBGOMP_OFFLOADED_ONLY #include "libgomp_f.h" #include "oacc-int.h" -#include "ompd-support.h" #include #include #include @@ -90,7 +89,6 @@ void **gomp_places_list; unsigned long gomp_places_list_len; uintptr_t gomp_def_allocator = omp_default_mem_alloc; int gomp_debug_var; -int gompd_enabled; unsigned int gomp_num_teams_var; int gomp_nteams_var; int gomp_teams_thread_limit_var; @@ -420,38 +418,6 @@ parse_target_offload (const char *name, enum gomp_target_offload_t *offload) gomp_error ("Invalid value for environment variable OMP_TARGET_OFFLOAD"); } -/* Parse OMP_DEBUG environment variable. */ - -static void -parse_debug (const char *name, int *debug_value) -{ - const char *env; - int ret = -1; - env = getenv (name); - if (env == NULL) - return; - while (isspace ((unsigned char) *env)) - ++env; - if (strncasecmp (env, "enabled", 7) == 0) - { - env += 7; - ret = 1; - } - else if (strncasecmp (env, "disabled", 8) == 0) - { - env += 8; - ret = 0; - } - while (isspace ((unsigned char) *env)) - ++env; - if (ret != -1 && *env == '\0') - { - *debug_value = ret; - return; - } - gomp_error ("Invalid value for environment variable OMP_DEBUG"); -} - /* Parse environment variable set to a boolean or list of omp_proc_bind_t enum values. Return true if one was present and it was successfully parsed. */ @@ -1517,9 +1483,6 @@ initialize_env (void) = thread_limit_var > INT_MAX ? UINT_MAX : thread_limit_var; } parse_int_secure ("GOMP_DEBUG", &gomp_debug_var, true); - parse_debug ("OMP_DEBUG", &gompd_enabled); - if (gompd_enabled == 1) - gompd_load (); #ifndef HAVE_SYNC_BUILTINS gomp_mutex_init (&gomp_managed_threads_lock); #endif diff --git a/libgomp/libgomp.map b/libgomp/libgomp.map index 54c69f7df0f..2ac58094169 100644 --- a/libgomp/libgomp.map +++ b/libgomp/libgomp.map @@ -13,7 +13,7 @@ OMP_1.0 { #ifdef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT # If the assembler used lacks the .symver directive or the linker # doesn't support GNU symbol versioning, we have the same symbol in - # two versions, which Sun ld chokes on. + # two versions, which Sun ld chokes on. omp_init_lock; omp_init_nest_lock; omp_destroy_lock; @@ -226,20 +226,6 @@ OMP_5.1 { omp_get_teams_thread_limit_; } OMP_5.0.2; -OMP_5.0.3 { - global: - ompd_dll_locations; - ompd_dll_locations_valid; - ompd_bp_parallel_begin; - ompd_bp_parallel_end; - ompd_bp_task_begin; - ompd_bp_task_end; - ompd_bp_thread_begin; - ompd_bp_thread_end; - ompd_bp_device_begin; - ompd_bp_device_end; -} OMP_5.1; - GOMP_1.0 { global: GOMP_atomic_end; diff --git a/libgomp/libgompd.map b/libgomp/libgompd.map index 85bdc3695f6..fc1b219cdde 100644 --- a/libgomp/libgompd.map +++ b/libgomp/libgompd.map @@ -16,6 +16,6 @@ OMPD_5.1 { ompd_thread_handle_compare; ompd_get_thread_id; ompd_get_device_from_thread; - local: - *; + ompd_bp_thread_begin; + ompd_bp_thread_end; }; diff --git a/libgomp/omp-tools.h.in b/libgomp/omp-tools.h.in index 50cfc3f2e72..492c1b9c88d 100644 --- a/libgomp/omp-tools.h.in +++ b/libgomp/omp-tools.h.in @@ -1,5 +1,4 @@ -/* Copyright (C) 2022 Free Software Foundation, Inc. - Contributed by Mohamed Atef . +/* Contributed by Mohamed Atef . This file is part of the GNU Offloading and Multi Processing Library (libgomp). Libgomp is free software; you can redistribute it and/or modify it diff --git a/libgomp/ompd-helper.c b/libgomp/ompd-helper.c index 55f44481ce5..b520aef88a4 100644 --- a/libgomp/ompd-helper.c +++ b/libgomp/ompd-helper.c @@ -1,5 +1,4 @@ -/* Copyright (C) 2022 Free Software Foundation, Inc. - Contributed by Mohamed Atef . +/* Contributed by Mohamed Atef . This file is part of the GNU Offloading and Multi Processing Library (libgomp). Libgomp is free software; you can redistribute it and/or modify it diff --git a/libgomp/ompd-helper.h b/libgomp/ompd-helper.h index e9bd30e23fd..fc3df17ea84 100644 --- a/libgomp/ompd-helper.h +++ b/libgomp/ompd-helper.h @@ -1,5 +1,4 @@ -/* Copyright (C) 2022 Free Software Foundation, Inc. - Contributed by Mohamed Atef . +/* Contributed by Mohamed Atef . This file is part of the GNU Offloading and Multi Processing Library (libgomp). Libgomp is free software; you can redistribute it and/or modify it diff --git a/libgomp/ompd-icv.c b/libgomp/ompd-icv.c index 0eb4b722cf3..c52a20b533c 100644 --- a/libgomp/ompd-icv.c +++ b/libgomp/ompd-icv.c @@ -1,5 +1,4 @@ -/* Copyright (C) 2022 Free Software Foundation, Inc. - Contributed by Mohamed Atef . +/* Contributed by Mohamed Atef . This file is part of the GNU Offloading and Multi Processing Library (libgomp). Libgomp is free software; you can redistribute it and/or modify it diff --git a/libgomp/ompd-init.c b/libgomp/ompd-init.c index 43365708faa..0cafcdbc24a 100644 --- a/libgomp/ompd-init.c +++ b/libgomp/ompd-init.c @@ -1,5 +1,4 @@ -/* Copyright (C) 2022 Free Software Foundation, Inc. - Contributed by Mohamed Atef . +/* Contributed by Mohamed Atef . This file is part of the GNU Offloading and Multi Processing Library (libgomp). Libgomp is free software; you can redistribute it and/or modify it diff --git a/libgomp/ompd-support.c b/libgomp/ompd-support.c index 0193df42d1b..0af771a20dd 100644 --- a/libgomp/ompd-support.c +++ b/libgomp/ompd-support.c @@ -1,5 +1,4 @@ -/* Copyright (C) 2022 Free Software Foundation, Inc. - Contributed by Mohamed Atef . +/* Contributed by Mohamed Atef . This file is part of the GNU Offloading and Multi Processing Library (libgomp). Libgomp is free software; you can redistribute it and/or modify it diff --git a/libgomp/ompd-support.h b/libgomp/ompd-support.h index 9fdc34105bf..fb2ba059217 100644 --- a/libgomp/ompd-support.h +++ b/libgomp/ompd-support.h @@ -1,22 +1,21 @@ -/* Copyright (C) 2022 Free Software Foundation, Inc. - Contributed by Mohamed Atef . - This file is part of the GNU Offloading and Multi Processing Library - (libgomp). - Libgomp is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - Under Section 7 of GPL version 3, you are granted additional - permissions described in the GCC Runtime Library Exception, version - 3.1, as published by the Free Software Foundation. - You should have received a copy of the GNU General Public License and - a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ +/* Contributed by Mohamed Atef . + This file is part of the GNU Offloading and Multi Processing Library + (libgomp). + Libgomp is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ /* This file contains the runtime support for gompd. */ diff --git a/libgomp/ompd-types.h.in b/libgomp/ompd-types.h.in index e5bfb2f37cf..20ae0deb902 100644 --- a/libgomp/ompd-types.h.in +++ b/libgomp/ompd-types.h.in @@ -1,5 +1,4 @@ -/* Copyright (C) 2022 Free Software Foundation, Inc. - Contributed by Mohamed Atef . +/* Contributed by Mohamed Atef . This file is part of the GNU Offloading and Multi Processing Library (libgomp). Libgomp is free software; you can redistribute it and/or modify it diff --git a/libgomp/team.c b/libgomp/team.c index d53246961b7..cb6875d70fa 100644 --- a/libgomp/team.c +++ b/libgomp/team.c @@ -30,7 +30,6 @@ #include "pool.h" #include #include -#include "ompd-support.h" #ifdef LIBGOMP_USE_PTHREADS pthread_attr_t gomp_thread_attr; @@ -76,7 +75,6 @@ gomp_thread_start (void *xdata) void (*local_fn) (void *); void *local_data; - ompd_bp_thread_begin (); #if defined HAVE_TLS || defined USE_EMUTLS thr = &gomp_tls_data; #else @@ -338,7 +336,6 @@ gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads, struct gomp_thread **affinity_thr = NULL; bool force_display = false; - ompd_bp_parallel_begin (); thr = gomp_thread (); nested = thr->ts.level; pool = thr->thread_pool; @@ -1014,7 +1011,6 @@ gomp_team_end (void) pool->last_team = team; gomp_release_thread_pool (pool); } - ompd_bp_parallel_end (); } #ifdef LIBGOMP_USE_PTHREADS