Bug 373597 - PLDT artifact analyses no longer work for Fortran
Summary: PLDT artifact analyses no longer work for Fortran
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: PLDT (show other bugs)
Version: 6.0   Edit
Hardware: All All
: P1 major (vote)
Target Milestone: 6.0   Edit
Assignee: Jeffrey Overbey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 373315 379066
  Show dependency tree
 
Reported: 2012-03-07 16:56 EST by Jeffrey Overbey CLA
Modified: 2014-03-14 11:53 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (95.99 KB, patch)
2012-03-07 17:03 EST, Jeffrey Overbey CLA
g.watson: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Overbey CLA 2012-03-07 16:56:57 EST
PLDT's MPI and OpenMP artifact analyses do not appear to work for Fortran anymore.  

This blocks Bug 373315.

I propose to fix this by adding extension points to pldt.mpi.core, pldt.openmp.core, and pldt.openacc which allow arbitrary artifact analyses to be contributed based on language ID.
Comment 1 Jeffrey Overbey CLA 2012-03-07 17:03:03 EST
Created attachment 212258 [details]
Proposed patch

Beth, here is the patch I plan to commit.  It adds three extension points:

 * org.eclipse.ptp.pldt.mpi.core.artifactAnalysis
 * org.eclipse.ptp.pldt.openmp.core.artifactAnalysis
 * org.eclipse.ptp.pldt.openacc.artifactAnalysis

The artifact analyses for C, C++, and Fortran are contributed via these extension points.  For example:

   <extension point="org.eclipse.ptp.pldt.mpi.core.artifactAnalysis">
      <artifactAnalysis
         languageID="org.eclipse.cdt.core.gcc"
         class="org.eclipse.ptp.pldt.mpi.core.analysis.CMPIArtifactAnalysis" />
      <artifactAnalysis
         languageID="org.eclipse.cdt.core.g++"
         class="org.eclipse.ptp.pldt.mpi.core.analysis.CMPIArtifactAnalysis" />
   </extension>

The contributed classes implement a new interface which I put into pldt.common:

public interface IArtifactAnalysis {
	ScanReturn runArtifactAnalysis(
		String languageID,
		ITranslationUnit tu,
		List<String> includes,
		boolean allowPrefixOnlyMatch);
}

Now, the #doArtifactAnalysis methods (e.g., in RunAnalyseMPIcommandHandler) are pretty simple.  They loop through the contributed analyses and run the first one that matches the language ID of the file being analyzed.

How does this sound to you?
Comment 2 Beth Tibbitts CLA 2012-03-07 21:50:11 EST
sounds good to me. this will give you flexibility to do something different for Fortran if need be.
Comment 3 Jeffrey Overbey CLA 2012-03-14 13:06:37 EDT
Pushed to master for Juno/6.0
Comment 4 Beth Tibbitts CLA 2014-03-14 11:53:02 EDT
updated target milestone to be 6.0 (PTP's) instead of 8.0 (which was Photran's)