Update contrib.
1 // Copyright (c) 1998-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
19 #ifndef __MSVCDOTNET__
20 #pragma warning(push, 3) // cannot compile MSVC's STL at warning level 4
21 #pragma warning(disable: 4786 4710 4530)
22 #endif //__MSVCDOTNET__
24 int const MajorVersion=2;
25 int const MinorVersion=0;
33 #else //!__MSVCDOTNET__
37 #endif //__MSVCDOTNET__
47 enum TAction {EProfile, ETrace, EActivity};
48 enum TFormat {EPercent, ESamples, EExcel};
49 enum TPartition {EDefault, EDll, EFunction, EBuckets, ESize};
59 enum TCfgFileErrors {EOk, ENoCfgFile, EErrorCfgFile};
61 static int ProcessCommandLine(int argc,char ** argv);
62 static int ProcessCfgFile(const char* aCfgFileName);
63 static void ExplainUsage();
64 static void ExplainConfigUsage();
67 static inline bool Option(int type)
68 {return (sOptions & type) != 0;}
69 static inline TAction Action()
71 static inline TFormat Format()
73 static inline TPartition Partition()
77 static void Abort(char const* message);
78 static void Corrupt(char const* message);
79 static ostream& Error();
80 static ostream& Warning();
82 static bool Match(const char* aString, const char* aMatch);
84 static void Information();
85 static CodeSpace* CreateCodeSpace(SymbolFile* aSymbols, NonXIP *aNonXIP);
86 static Sampler* CreateSampler(SymbolFile* aSymbols, NonXIP *aNonXIP);
88 static TAction sAction;
89 static TFormat sFormat;
90 static TPartition sPartition;
92 static std::vector<const char*> sTraces;
93 static const char* sRomFile;
94 static const char* sDll;
95 static const char* sFunction;
96 static unsigned sBase;
98 static unsigned sBuckets;
99 static unsigned sBucketSize;
100 static double sCutOff;
101 static unsigned sBeginSample;
102 static unsigned sEndSample;
104 static std::string iRomFile;
105 static std::string iDll;
106 static std::string iFunction;
107 static std::string iThread;
108 static std::vector<std::string> iTraces;
110 static const char* sThread;