Upload
peter-haase
View
90
Download
6
Embed Size (px)
DESCRIPTION
Application Migration to HP NonStop H- und J-Series Operating Systems
Citation preview
New Development ToolsNew Development ToolsModule 6
PC-Hosted Development PC-Hosted Development ToolsTools
5 – 2
Tools TNS/R TNS/EC/C++ compiler (Guardian, OSS)
c89.exe –Wtarget=tns/r
c89.exe –Wtarget=tns/e
pTAL compiler (Guardian)
ptal.exe eptal.exe
COBOL compiler (Guardian, OSS)
nmcobol.exe ecobol.exe
Non-PIC linker nld.exe not-supported
PIC linker ld.exe eld
Object File Utility noft.exe enoft.exe
Enterprise Toolkit (ETK)
R2.x, R3.0* or later R3.0* or later
Tandem Dev Suite (TDS)
Available not-supported
Visual Inspect (GUI Debugger)
R2.x, R3.0* or later R3.0* or later* Supports both TNS/R as well as TNS/E platform.
Code CoverageCode Coverage◦Available with COBOL, pTAL, and C/C++
compilers on Integrity NonStop servers◦Creates instrumented object files
containing extra code◦Records which functions and blocks are
executed ◦Records how many times each is
executed ◦The code coverage report is a set of
HTML files viewable with any standard HTML browser
6 - New Development Tools 3
Profile Guided Optimization Profile Guided Optimization (PGO)(PGO)
◦pTAL and C/C++ compilers only Incorporate profiling information from
program execution into optimization Level 2 optimization only
6 - New Development Tools 4
ApplicabilityApplicability◦Can be used with:
OSS processes Guardian processes Active and passive process pairs Mixed language processes Processes with embedded NonStop
SQL/MP or NonStop SQL/MX
6 - New Development Tools 5
UseUse◦No source code changes are needed
to instrument an application. ◦Changes are in the commands used
to compile and link the application Separate compiler directives for Code
Coverage and for Profile Guided Optimization
◦You may instrument only a subset of your application specify the compiler options for only that
subset of your source files.
6 - New Development Tools 6
Code Coverage Process Code Coverage Process FlowFlow
6 - New Development Tools 7
Workstation
Source Compiler Execution
profmrg DPI**
InstrumentedObject
Rawdata
Rawdata
Execution
codecov
SPI*
HTML
*Static Profiling Information **Dynamic Profiling Information
copy
copy
Installing the Code Cover Installing the Code Cover UtilityUtility
◦Program codecov runs on a Windows workstation
◦codecov: Copy $SYSTEM.ZCODECOV.T0746SET to
workstation Change the name to setup.exe Run setup.exe
Creates \Program Files\Hewlett-Packard\CodeCoverage\codecov.exe
◦Add \Program Files\Hewlett-Packard\CodeCoverage to PATH
6 - New Development Tools 8
Building an Application Building an Application for Code Coveragefor Code Coverage
◦Compiler option: Guardian: CODECOV OSS: –Wcodecov Windows:
c89, ecobol: –Wcodecov eptal: –codecov
◦Creates or updates the Static Profiling Information (SPI) file: Guardian: PGOSPI, code 180 OSS/Windows: pgopti.spi
◦If link editing manually: Use –l pgo to reference the pgodll library
6 - New Development Tools 9
Running the ApplicationRunning the Application◦Execute as normal◦Process creates a new raw data file
for each execution: Guardian: ZZPFxxxx, code 180, in current
default subvolume OSS: ZZPFxxxx.dyn in current working
directory
◦Creates ZZPELOG if any errors during execution
6 - New Development Tools 10
Code Coverage Sample 1 (1 Code Coverage Sample 1 (1 of 8)of 8) 101> ccomp/in mainc/mainco;codecov,optimize 1
102> ccomp/in callc/callco;codecov,optimize 1
103> eld -o calcator mainco callco $system.system.ccplmain -l crtl -l cre -l pgo
104> run calcator
YOU HAVE JUST STARTED THE PROCESS.
ENTER FIRST NUMBER [or 0 to stop]: 12
ENTER THE SECOND NUMBER: 34
THE NUMBERS ENTERED WERE: 12 & 34
THE TOTAL IS: 46
ENTER FIRST NUMBER [or 0 to stop]: 0
105> fileinfo
$FC1.TGCPU
CODE EOF LAST MODIFIED OWNER RWEP PExt SExt
PGOSPI 180 405 07AUG2008 13:50 34,26 OOOO 14 42
PGOSPL 180 0 07AUG2008 13:50 34,26 OOOO 14 42
ZZPF2B81 180 840 07AUG2008 13:55 34,26 OOOO 14 42
6 - New Development Tools 11
Any optimization level
Added DDL
Created files
Execute all the code
Code Coverage Sample 1 (2 Code Coverage Sample 1 (2 of 8)of 8)
106> profmrg
profmrg - T0747H01
Copyright 2006 Hewlett-Packard Company.
\ruby.$system.system.profmrg: looking at dynamic file: \RUBY.$FC1.TGCPU.ZZPF2B81
107> fileinfo pgodpi
$FC1.TGCPU
CODE EOF LAST MODIFIED OWNER RWEP PExt SExt
PGODPI 80 1340 07AUG2008 14:01 34,26 OOOO 14 42
6 - New Development Tools 12
Dynamic Profiling file
Code Coverage Sample 1 (3 Code Coverage Sample 1 (3 of 8)of 8) On the Workstation: C:\CodeProfilingUtilities>dir pgo*
08/07/2008 04:54 PM 1,340 pgodpi
08/07/2008 04:54 PM 405 pgospi
2 File(s) 1,745 bytes
0 Dir(s) 43,714,383,872 bytes free
C:\CodeProfilingUtilities>codecov -spi pgospi -dpi pgodpi -host 204.160.41.45 -login edu.terryg -maddr [email protected] -prj SampleRun
codecov - T0746H01
Copyright 2006 Hewlett-Packard Company.
Password for edu.terryg on 204.160.41.45:
33% .. 67% .. 100%
C:\CodeProfilingUtilities>dir c*
08/07/2008 05:04 PM <DIR> CodeCoverage
08/07/2008 05:12 PM 355 CODE_COVERAGE.HTML
6 - New Development Tools 13
Files copied from NonStop
Code Coverage Sample 1 (4 Code Coverage Sample 1 (4 of 8)of 8)
6 - New Development Tools 14
Code Coverage Sample 1 (5 Code Coverage Sample 1 (5 of 8)of 8)
6 - New Development Tools 15
Code Coverage Sample 1 (6 Code Coverage Sample 1 (6 of 8)of 8)
6 - New Development Tools 16
Code Coverage Sample 1 (7 Code Coverage Sample 1 (7 of 8)of 8)
6 - New Development Tools 17
Code Coverage Sample 1 (8 Code Coverage Sample 1 (8 of 8)of 8)
6 - New Development Tools 18
Code Coverage Sample 2 (1 Code Coverage Sample 2 (1 of 5)of 5) 135> run calcator 135.. YOU HAVE JUST STARTED THE PROCESS.
ENTER FIRST NUMBER [or 0 to stop]: 0 136>
6 - New Development Tools 19
Execute part of the code
Code Coverage Sample 2 (2 Code Coverage Sample 2 (2 of 5)of 5)
6 - New Development Tools 20
Code Coverage Sample 2 (3 Code Coverage Sample 2 (3 of 5)of 5)
6 - New Development Tools 21
Block not executed
Code Coverage Sample 2 (4 Code Coverage Sample 2 (4 of 5)of 5)
6 - New Development Tools 22
Function not executed
Code Coverage Sample 2 (5 Code Coverage Sample 2 (5 of 5)of 5)
6 - New Development Tools 23
Counts option
Profile Guided Optimization Profile Guided Optimization Process FlowProcess Flow
6 - New Development Tools 24
Source Compiler Execution
profmrg DPI*
InstrumentedObject
Rawdata
Rawdata
Execution
*Dynamic Profiling Information
Compiler OptimizedObject
profgen option
profuse option
Building an Application for Building an Application for PGOPGO
◦Available only for epTAL, C/C++◦Compiler option:
Guardian: PROFGEN OSS: –Wprofgen Windows:
c89, ecobol: –Wprofgen eptal: –profgen
Must use level 2 optimization
◦If link editing manually: Use –l pgo to reference the pgodll
library
6 - New Development Tools 25
Using PGO Using PGO
◦Compiler option: Guardian: PROFUSE OSS: –Wprofuse Windows:
c89, ecobol: –Wprofuse eptal: –profuse
profuse option may specify the name of the DPI file if not default name or location
6 - New Development Tools 26
PGO Sample Run (1 of 2)PGO Sample Run (1 of 2) 62> ccomp/in mainc/mainco;profgen,optimize 2
63> ccomp/in callc/callco;profgen,optimize 2
64> eld -o calcatr1 mainco callco $system.system.ccplmain -l crtl -l cre -l pgo
65> fileinfo calc*
$FC1.TGCPU
CODE EOF LAST MODIFIED OWNER RWEP PExt SExt
CALCATR1 800 21416 07AUG2008 13:10 34,26 OOOO 28 518
66> run calcatr1
PID: 1,1063 \RUBY.$FC1.TGCPU.CALCATR1
STOPPED: 1,1063
CPU time: 0:00:00.003
67> fileinfo zz*
$FC1.TGCPU
CODE EOF LAST MODIFIED OWNER RWEP PExt SExt
ZZPFN0L6 180 720 07AUG2008 13:13 34,26 OOOO 14 42
6 - New Development Tools 27
PGO Sample Run (2 of 2)PGO Sample Run (2 of 2) 68> profmrg
profmrg - T0747H01
\ruby.$system.system.profmrg: looking at dynamic file: \RUBY.$FC1.TGCPU.ZZPFN0L6
69> fileinfo p*
CODE EOF LAST MODIFIED OWNER RWEP PExt SExt
PGODPI 180 1220 07AUG2008 13:16 34,26 OOOO 14 42
70> ccomp/in mainc/mainco;profuse,optimize 2
71> ccomp/in callc/calcco;profuse,optimize 2
72> eld -o calcatr2 mainco callco $system.system.ccplmain -l crtl -l cre
73> run calcatr2
PID: 1,1049 \RUBY.$FC1.TGCPU.CALCATR2
STOPPED: 1,1049 CPU time: 0:00:00.002
74> fileinfo calc*
CODE EOF LAST MODIFIED OWNER RWEP PExt SExt
CALCATR1 800 21416 07AUG2008 13:10 34,26 OOOO 28 518
CALCATR2 800 20896 07AUG2008 13:20 34,26 OOOO 28 518
6 - New Development Tools 28
Questions ?Questions ?
29
6 - New Development Tools 30