• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

kcachegrind

  • sources
  • kde-4.12
  • kdesdk
  • kcachegrind
  • libcore
coverage.h
Go to the documentation of this file.
1 /* This file is part of KCachegrind.
2  Copyright (C) 2002 Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
3 
4  KCachegrind is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public
6  License as published by the Free Software Foundation, version 2.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; see the file COPYING. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 /*
20  * Function Coverage Analysis
21  */
22 
23 #ifndef COVERAGE_H
24 #define COVERAGE_H
25 
26 #include "tracedata.h"
27 
36 class Coverage : public TraceAssoziation
37 {
38 public:
39  /* Direction of coverage analysis */
40  enum CoverageMode { Caller, Called };
41 
42  // max depth for distance histogram
43 #define maxHistogramDepthValue 40
44  static const int maxHistogramDepth;
45 
46  static const int Rtti;
47 
48  Coverage();
49 
50  virtual int rtti() { return Rtti; }
51  void init();
52 
53  TraceFunction* function() { return _function; }
54  double self() { return _self; }
55  double inclusive() { return _incl; }
56  double firstPercentage() { return _firstPercentage; }
57  double& callCount() { return _callCount; }
58  int minDistance() { return _minDistance; }
59  int maxDistance() { return _maxDistance; }
60  int inclusiveMedian();
61  int selfMedian();
62  double* selfHistogram() { return _selfHisto; }
63  double* inclusiveHistogram() { return _inclHisto; }
64  bool isActive() { return _active; }
65  bool inRecursion() { return _inRecursion; }
66 
67  void setSelf(float p) { _self = p; }
68  void setInclusive(float p) { _incl = p; }
69  void setCallCount(float cc) { _callCount = cc; }
70  void setActive(bool a) { _active = a; }
71  void setInRecursion(bool r) { _inRecursion = r; }
72 
84  static TraceFunctionList coverage(TraceFunction* f, CoverageMode m,
85  EventType* ct);
86 
87 private:
88  void addCallerCoverage(TraceFunctionList& l, double, int d);
89  void addCallingCoverage(TraceFunctionList& l, double, double, int d);
90 
91  double _self, _incl, _firstPercentage, _callCount;
92  int _minDistance, _maxDistance;
93  bool _active, _inRecursion;
94  double _selfHisto[maxHistogramDepthValue];
95  double _inclHisto[maxHistogramDepthValue];
96 
97  // temporary set for one coverage analysis
98  static EventType* _costType;
99 };
100 
101 #endif
102 
Coverage::inclusive
double inclusive()
Definition: coverage.h:55
Coverage::minDistance
int minDistance()
Definition: coverage.h:58
Coverage::inclusiveMedian
int inclusiveMedian()
Definition: coverage.cpp:55
Coverage::rtti
virtual int rtti()
Definition: coverage.h:50
Coverage::coverage
static TraceFunctionList coverage(TraceFunction *f, CoverageMode m, EventType *ct)
Calculate coverage of all functions based on function f.
Definition: coverage.cpp:81
TraceFunction
A traced function.
Definition: tracedata.h:1122
Coverage::callCount
double & callCount()
Definition: coverage.h:57
Coverage::maxHistogramDepth
static const int maxHistogramDepth
Definition: coverage.h:44
Coverage::setActive
void setActive(bool a)
Definition: coverage.h:70
EventType
A cost type, e.g.
Definition: eventtype.h:43
Coverage::init
void init()
Definition: coverage.cpp:36
Coverage::setInclusive
void setInclusive(float p)
Definition: coverage.h:68
TraceFunctionList
QList< TraceFunction * > TraceFunctionList
Definition: tracedata.h:188
Coverage::Caller
Definition: coverage.h:40
tracedata.h
Coverage
Coverage of a function.
Definition: coverage.h:36
Coverage::selfHistogram
double * selfHistogram()
Definition: coverage.h:62
maxHistogramDepthValue
#define maxHistogramDepthValue
Definition: coverage.h:43
Coverage::CoverageMode
CoverageMode
Definition: coverage.h:40
Coverage::selfMedian
int selfMedian()
Definition: coverage.cpp:68
TraceAssoziation
For temporary assoziation of objects with TraceFunctions.
Definition: tracedata.h:1068
Coverage::setSelf
void setSelf(float p)
Definition: coverage.h:67
Coverage::setInRecursion
void setInRecursion(bool r)
Definition: coverage.h:71
Coverage::Rtti
static const int Rtti
Definition: coverage.h:46
TraceAssoziation::_function
TraceFunction * _function
Definition: tracedata.h:1109
Coverage::maxDistance
int maxDistance()
Definition: coverage.h:59
Coverage::firstPercentage
double firstPercentage()
Definition: coverage.h:56
Coverage::inRecursion
bool inRecursion()
Definition: coverage.h:65
Coverage::isActive
bool isActive()
Definition: coverage.h:64
Coverage::Coverage
Coverage()
Definition: coverage.cpp:32
Coverage::Called
Definition: coverage.h:40
Coverage::inclusiveHistogram
double * inclusiveHistogram()
Definition: coverage.h:63
Coverage::setCallCount
void setCallCount(float cc)
Definition: coverage.h:69
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:03:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kcachegrind

Skip menu "kcachegrind"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal