6c80725ad94bdfb1af0652fc60565132a0e992e1
1 /**
2 * Copyright (C) ARM Limited 2010-2012. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
9 #ifndef __COLLECTOR_H__
10 #define __COLLECTOR_H__
12 #include <stdio.h>
14 class Collector {
15 public:
16 Collector();
17 ~Collector();
18 void start();
19 void stop();
20 int collect(char* buffer);
21 void enablePerfCounters();
22 void setupPerfCounters();
23 int getBufferSize() {return bufferSize;}
24 private:
25 int bufferSize;
26 int bufferFD;
27 char * buffer;
29 void checkVersion();
30 void getCoreName();
32 char* resolvePath(const char* file);
33 int readIntDriver(const char* path, int* value);
34 int writeDriver(const char* path, int value);
35 int writeDriver(const char* path, const char* data);
36 int writeReadDriver(const char* path, int* value);
37 };
39 #endif //__COLLECTOR_H__