DiscussionsIssue archiveOCCT:Foundation Classes

Archived issue #0023237

OSD_PerfMeter reports wrong (zero) times

Open CASCADEOCCT:Foundation Classesclosed13 public notes

Search issues

Description

When running on Linux CentOS 64-bit (gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-11)), report printed by perf_print_all_meters() is wrong: all CPU times are zero (should be ~ 6 sec in total in my case):

          Perf meter results : enters seconds �ec/enter
OCCFace::ProjPnt 1, face 0x20092e00 : 40 0.00 0.00
OCCFace::ProjPnt 1, face 0x20091260 : 40 0.00 0.05
OCCFace::ProjPnt 1, face 0x20083160 : 60 0.00 0.03
OCCFace::ProjPnt 1, face 0x200859b8 : 40 0.00 0.05
OCCFace::ProjPnt 1, face 0x2008f238 : 20 0.00 0.05
OCCFace::ProjPnt 1, face 0x2008d1e8 : 20 0.00 0.05
OCCFace::ProjPnt 1, face 0x2007d018 : 20 0.00 0.05
OCCFace::ProjPnt 1, face 0x2008b410 : 2049 0.00 0.07
Boundary test : 5732 0.00 0.01
OCCFace::ProjPnt 1, face 0x2008b1d8 : 307 0.00 0.33
OCCFace::ProjPnt 1, face 0x2008cab8 : 273 0.00 0.16
OCCFace::ProjPnt 1, face 0x2008a830 : 351 0.00 0.18
OCCFace::ProjPnt 1, face 0x2007f0e8 : 482 0.00 0.17
OCCFace::ProjPnt 1, face 0x2008a160 : 355 0.00 0.21
OCCFace::ProjPnt 1, face 0x20077098 : 1915 0.00 0.06

Chrono OCCFace::ProjPoint 1: 6.37 sec

Public activity

13 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Dear abv,
Fix is is integrated into branch CR23237.
Please, review.
02Commenter 2
No remarks, please test
03Commenter 3
Dear Commenter 1,
Branch CR23237 (and master from occt GIT master) was compiled on Linux and Windows platforms and tested.

Regressions:
Not detected

Improvements:
Not detected
04Commenter 4
Dear omy,
It is necessary to create test case in QABugs package.
05Commenter 5
Dear abv,
I have added a new testcase into QABugs package.
Please, review.
06Commenter 6
Some remarks:

1. Instead of creating a new file QABugs_20.cxx, consider adding the new code to existing QABugs_19.cxx (which has only 2 commands defined so far).

2. In implementation of test functions in QABugs, please make locally used functions static (or put them to anonymous namespace) to avoid exposing them outside of this file.

3. In implementation of test function in QABugs, use word "Error" instead of "FAIL" to indicate failure.

4. Remark from kgv: in OSD_PerhMeter.h, please consider use of existing macro Standard_EXPORTEXTERNC instead of locally defined OSD_PM_EXPORT; this will also allow to avoid common "extern "C" block.
07Commenter 7
Dear abv,
I've made fixes you mentioned above.
Please, review.
08Commenter 8
The branch was built on Linux CentOS 5.5-64.
The testcase returns Error without fix
and returns OK with the fix.
09Commenter 9
I have rebased the fix on current master and submitted to new branch CR23237_3. The test is corrected to use Boolean operation on shapes instead of computing Fibonacci numbers, as the latter is too fast for timers to produce adequate results. Also added necessary corrections in QANCollection*.h files. Please check on Linux
10Commenter 10
Dear Commenter 1,
Branch CR23237_3 (and products from GIT master) was compiled on Linux and Windows platforms.
There are compilation errors on Linux:

../../../src/QABugs/QABugs_19.cxx: In function 'Standard_Integer OCC23237(Draw_Interpretor&, Standard_Integer, const char**)':
../../../src/QABugs/QABugs_19.cxx:122: error: conversion from 'BRepPrimAPI_MakeBox' to 'TopoDS_Shape' is ambiguous
../../../inc/BRepPrimAPI_MakeBox.hxx:79: note: candidates are: BRepPrimAPI_MakeBox::operator TopoDS_Solid()
../../../inc/BRepPrimAPI_MakeBox.hxx:76: note: BRepPrimAPI_MakeBox::operator TopoDS_Shell()
../../../inc/BRepBuilderAPI_MakeShape.hxx:55: note: BRepBuilderAPI_MakeShape::operator TopoDS_Shape() const
../../../src/QABugs/QABugs_19.cxx:123: error: conversion from 'BRepPrimAPI_MakeSphere' to 'TopoDS_Shape' is ambiguous
../../../inc/BRepPrimAPI_MakeOneAxis.hxx:52: note: candidates are: BRepPrimAPI_MakeOneAxis::operator TopoDS_Solid()
../../../inc/BRepPrimAPI_MakeOneAxis.hxx:49: note: BRepPrimAPI_MakeOneAxis::operator TopoDS_Shell()
../../../inc/BRepPrimAPI_MakeOneAxis.hxx:46: note: BRepPrimAPI_MakeOneAxis::operator TopoDS_Face()
../../../inc/BRepBuilderAPI_MakeShape.hxx:55: note: BRepBuilderAPI_MakeShape::operator TopoDS_Shape() const
11Commenter 11
Please indicate version of GCC that produce these errors.

The code is refactored hoping to eliminate the problem, see branch CR23237_3
12Commenter 1
CR23237_3 was tested on Mandriva 2010
> gcc --version
gcc (GCC) 4.4.1
13Commenter 13
Dear Commenter 1,
Branch CR23237_3 (and products from GIT master) was compiled on Linux and Windows platforms and tested.

Regressions:
Not detected

Improvements:
Not detected

Testing cases:
bugs fclasses(002) bug23237 - OK.

Related records