[PATCH] D18013: Using MPI for Profiling Data Reduction

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 9 16:41:45 PST 2016


On Wed, Mar 9, 2016 at 4:35 PM, Sean Silva <chisophugis at gmail.com> wrote:

> silvas added a subscriber: silvas.
>
> ================
> Comment at: lib/profile/InstrProfilingFile.c:86
> @@ -74,2 +85,3 @@
>    const char *Filename;
> +#ifdef _MSC_VER
>    FILE *File;
> ----------------
> Let's split this change into a separate patch for a focused discussion on
> the requirements and possible solutions.
>
> ================
> Comment at: lib/profile/InstrProfilingReduce.c:1
> @@ +1,2 @@
> +/*===- InstrProfilingReduce.c - Support library for applications using
> MPI ===*\
> +|*
> ----------------
> Let's call this InstrProfilingMPI.c consistent with the comment.
>
> ================
> Comment at: lib/profile/InstrProfilingStub.c:14
> @@ +13,2 @@
> +void MPI_Reduce() { abort(); }
> +void PMPI_Finalize() { abort(); }
> ----------------
> davidxl wrote:
> > Is the MPI library defining thse functions  static or a DSO? If the
> former, then perhaps declare those stubs weak so that we don't rely on the
> link order of the runtime library
> Why do we need these stubs?
>
>
I thought it is needed when the binary is not linked with mpi library, but
InstrProfilingReduce.o is linked in. Now that you asked, it seems that for
that case, InstrProfilingReduce.o should not be linked in at all.

I think the culprit is that __llvm_write_profile_data flag is defined in
that file. With my suggestion to move it to InstrProfiling.c,  I think
there is no need for the stub file. Good catch.

David



> http://reviews.llvm.org/D18013
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160309/cd9b0a38/attachment.html>


More information about the llvm-commits mailing list