0
+ − 1
// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
+ − 2
// All rights reserved.
+ − 3
// This component and the accompanying materials are made available
+ − 4
// under the terms of the License "Eclipse Public License v1.0"
+ − 5
// which accompanies this distribution, and is available
+ − 6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ − 7
//
+ − 8
// Initial Contributors:
+ − 9
// Nokia Corporation - initial contribution.
+ − 10
//
+ − 11
// Contributors:
+ − 12
//
+ − 13
// Description:
+ − 14
//
+ − 15
+ − 16
#ifndef __DISTRIBUTION__
+ − 17
#define __DISTRIBUTION__
+ − 18
+ − 19
#include "trace.h"
+ − 20
#include "codespace.h"
+ − 21
#include <vector>
+ − 22
+ − 23
class Distribution : public Sampler
+ − 24
{
+ − 25
public:
+ − 26
struct ThreadData
+ − 27
{
+ − 28
ThreadData(const Thread& aThread, int aSize);
+ − 29
ThreadData(int aCutoff);
+ − 30
bool operator<(const ThreadData& aRhs) const;
+ − 31
//
+ − 32
const Thread* iThread;
+ − 33
int* iBuckets;
+ − 34
int iBucketsLength;
+ − 35
int iTotal;
+ − 36
};
+ − 37
typedef std::vector<ThreadData> Data;
+ − 38
public:
+ − 39
Distribution(CodeSpace& aCodeSpace, double aCutOff);
+ − 40
private:
+ − 41
void Sample(unsigned aNumber, const Thread& aThread, PC aPc);
+ − 42
void Complete(unsigned aTotal, unsigned aActive);
+ − 43
private:
+ − 44
CodeSpace& iCodeSpace;
+ − 45
double iCutOff;
+ − 46
Data iData;
+ − 47
};
+ − 48
+ − 49
#endif // __DISTRIBUTION__