Bug 373597

Summary: PLDT artifact analyses no longer work for Fortran
Product: [Tools] PTP Reporter: Jeffrey Overbey <com-eclipse-dot-org>
Component: PLDTAssignee: Jeffrey Overbey <com-eclipse-dot-org>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P1 CC: beth
Version: 6.0   
Target Milestone: 6.0   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 373315, 379066    
Attachments:
Description Flags
Proposed patch g.watson: iplog-

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)