30
New Development Tools New Development Tools Module 6

Mod06 new development tools

Embed Size (px)

DESCRIPTION

Application Migration to HP NonStop H- und J-Series Operating Systems

Citation preview

Page 1: Mod06 new development tools

New Development ToolsNew Development ToolsModule 6

Page 2: Mod06 new development tools

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.

Page 3: Mod06 new development tools

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

Page 4: Mod06 new development tools

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

Page 5: Mod06 new development tools

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

Page 6: Mod06 new development tools

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

Page 7: Mod06 new development tools

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

Page 8: Mod06 new development tools

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

Page 9: Mod06 new development tools

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

Page 10: Mod06 new development tools

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

Page 11: Mod06 new development tools

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

Page 12: Mod06 new development tools

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

Page 13: Mod06 new development tools

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

Page 14: Mod06 new development tools

Code Coverage Sample 1 (4 Code Coverage Sample 1 (4 of 8)of 8)

6 - New Development Tools 14

Page 15: Mod06 new development tools

Code Coverage Sample 1 (5 Code Coverage Sample 1 (5 of 8)of 8)

6 - New Development Tools 15

Page 16: Mod06 new development tools

Code Coverage Sample 1 (6 Code Coverage Sample 1 (6 of 8)of 8)

6 - New Development Tools 16

Page 17: Mod06 new development tools

Code Coverage Sample 1 (7 Code Coverage Sample 1 (7 of 8)of 8)

6 - New Development Tools 17

Page 18: Mod06 new development tools

Code Coverage Sample 1 (8 Code Coverage Sample 1 (8 of 8)of 8)

6 - New Development Tools 18

Page 19: Mod06 new development tools

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

Page 20: Mod06 new development tools

Code Coverage Sample 2 (2 Code Coverage Sample 2 (2 of 5)of 5)

6 - New Development Tools 20

Page 21: Mod06 new development tools

Code Coverage Sample 2 (3 Code Coverage Sample 2 (3 of 5)of 5)

6 - New Development Tools 21

Block not executed

Page 22: Mod06 new development tools

Code Coverage Sample 2 (4 Code Coverage Sample 2 (4 of 5)of 5)

6 - New Development Tools 22

Function not executed

Page 23: Mod06 new development tools

Code Coverage Sample 2 (5 Code Coverage Sample 2 (5 of 5)of 5)

6 - New Development Tools 23

Counts option

Page 24: Mod06 new development tools

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

Page 25: Mod06 new development tools

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

Page 26: Mod06 new development tools

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

Page 27: Mod06 new development tools

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

Page 28: Mod06 new development tools

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

Page 29: Mod06 new development tools

Questions ?Questions ?

29

Page 30: Mod06 new development tools

6 - New Development Tools 30