Вы находитесь на странице: 1из 5

Parfait Notes

I have named this doc as Parfait Notes since it is a collection of ideas and samples. These have been put
together to help pass along what changes I have made to make the new version (1.5.3) of Parfait usable.
All changes I have made are on the OSB_MAIN_LINUX.X64 labels. The prior work done by Aruni
continues to be in place for the OSB_12.1.0.1.0 _LINUX.X64 labels. The OSB_12.1.0.2.0_LINUX.X64
labels will behave as the 12.1.0.1.0 labels until such time as the changes to main are backported.

Why go to a new version? 2 major reasons for the change to 1.5.3

1. 1.5.3 has improved functionality in identifying memory leaks and uninitialized variables
2. Prior version has a bug which causes Parfait to dump its stack when compiling
reliaty/src/main/qtar/tar.c

Parfait is being supported by the tools group within Oracle. They have provided a couple of scripts
which assist the user in running Parfait, analyzing the results and posting these results to a Parfait
server. The 2 scripts are

pd-parfait and pd-parfait_server_load.

The approach described below was chosen with the idea that every Linux .x64label would be an
automatic process where every label would have its results posted on a server as part of the label
generation process. The approach also allows the manual step of generating the .bc files for the case
where we disable the OSB memory manager and those results could also be posted on the server.

This is just one approach for accomplishing the generation of Parfai t results. Whoever picks up this
effort should understand this effort is a work in progress and will need to modify the approach to meet
the ever changing requirements of the project.

Current state

Changes have been made to the OSB_MAIN_LINUX.X64 labels so that the .bc files are generated during
the build. These files have not been made into do’s yet. The reason for this is that additional changes
are required to the “clean” process to remove these files when a gmake clean is issued. I am not
attempting to make these clean changes given the short time I have left.

The following command sequence in a OSB_MAIN_LINUX.X64 view will build the .bc files, analyze, then
post the results to the “test” server maintained by the tools group.

Remaining steps for automated results


1. Modify the gmake clean operation to clean up the .bc files in each of the src directives
2. Add the .bc files to the list of do’s ( the integrator will do this when requested)
3. Add the server load step to the label generation process ( integrator task )
4. Notify Ed Christian when you want to go live and he will move you to the “production” server
5. Make all the same changes for the 12.1.0.2 labels when that series is available.

Note: the server load command is


/ade_autofs/ade_infra/PARFAIT_MAIN_LINUX.X64.rdd/LATEST/parfait/bin/pd-parfait_server_load

Manual use
The pd-parfait command can be used now with the OSB_MAIN_LINUX.X64 labels to examine any specific
file or directory. This is extremely useful for a developer that wants to check the files in a txn prior to
merge. These results are reported to the user rather than posting to a server. Below is an example of
running the script in the reliaty/src/wst directory. You will see that it first compiles all files requested,
*.c. Then each file is analyzed with the results reported in the last step.

Example 1
pd-parfait *.c

Starting compiles with Parfait...

build_table.c
wst_alerts.c
wst_conf.c
wst_ctyp.c
wst_devs.c
wst_encr.c
wst_exec.c
wst_find.c
wst_fml.c
wst_gcdb.c
wst_gchk.c
wst_gdvn.c
wst_getc.c
wst_gop.c
wst_gsn.c
wst_gsne.c
wst_gst.c
wst_gthg.c
wst_info.c
wst_init.c
wst_llwe.c
wst_log.c
wst_map.c
wst_mkdi.c
wst_open.c
wst_oprt.c
wst_ph.c
wst_sens.c
wst_setb.c
wst_setm.c
wst_util.c
wst_vd.c
wst_wait.c
wst_wire.c

Starting Parfait analysis...

Using Parfait standard config file: ../share/parfait-tools/std.conf

Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_alerts.o.bc in 78 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/build_table.o.bc in 122 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_llwe.o.bc in 66 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_devs.o.bc in 111 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_map.o.bc in 65 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_oprt.o.bc in 129 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_wire.o.bc in 77 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_exec.o.bc in 377 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_gdvn.o.bc in 67 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_find.o.bc in 102 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_init.o.bc in 90 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_mkdi.o.bc in 126 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_gchk.o.bc in 77 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_gcdb.o.bc in 89 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_gthg.o.bc in 68 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_ph.o.bc in 68 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_vd.o.bc in 71 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_util.o.bc in 96 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_gst.o.bc in 91 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_gop.o.bc in 146 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_gsne.o.bc in 98 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_conf.o.bc in 83 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_ctyp.o.bc in 72 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_getc.o.bc in 73 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_encr.o.bc in 101 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_gsn.o.bc in 67 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_log.o.bc in 79 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_setb.o.bc in 67 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_sens.o.bc in 366 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_setm.o.bc in 270 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_wait.o.bc in 67 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_fml.o.bc in 127 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_info.o.bc in 94 ms
Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_open.o.bc in 209 ms
Completion:
34 modules processed successfully

The following issues were found:

Error: Uninitialised memory


Possible access to uninitialised memory '<unknown>'
at line 620 of /ade/jwadleig_main1/reliaty/src/wst/wst_fml.c in function 'dump_entry'.
<unknown> allocated at line 374.
<unknown> uninitialised when p->version is one of 2, 3, 4 at line 409
and enttype != enttype at line 456.
at line 620 of /ade/jwadleig_main1/reliaty/src/wst/wst_fml.c in function 'dump_entry'.
<unknown> allocated at line 375.
<unknown> uninitialised when p->version is one of 2, 3, 4 at line 409
and enttype != enttype at line 456.

Example 2
Alternatively you can run the script against a specific file. Below you will see the results or running
against a file with a known issue.

pd-parfait wst_fml.c

Starting compiles with Parfait...

wst_fml.c

Starting Parfait analysis...

Using Parfait standard config file: ../share/parfait-tools/std.conf

Processed /scratch/jwadleig/view_storage/jwadleig_main1/reliaty/src/wst/wst_fml.o.bc in 163 ms


Completion:
1 modules processed successfully

The following issues were found:

Error: Uninitialised memory


Possible access to uninitialised memory '<unknown>'
at line 620 of /ade/jwadleig_main1/reliaty/src/wst/wst_fml.c in function 'dump_entry'.
<unknown> allocated at line 374.
<unknown> uninitialised when p->version is one of 2, 3, 4 at line 409
and enttype != enttype at line 456.
at line 620 of /ade/jwadleig_main1/reliaty/src/wst/wst_fml.c in function 'dump_entry'.
<unknown> allocated at line 375.
<unknown> uninitialised when p->version is one of 2, 3, 4 at line 409
and enttype != enttype at line 456.

Changes made
Changes were made to 2 files , reliaty/Makefile and reliaty/s_reliaty.mk. For Makefile the changes were
to remove the definitions required for the prior use of Parfait. The s_reliaty.mk changes include
removal of prior Parfait options and to set the location of the Parfait tools and also to set the option of
generating the .bc files on every build.

Contacts
The main contact in the tools group for Parfait is Edward.Christian@oracle.com

Вам также может понравиться