#ifndef __PERF_COUNTS_H
#define __PERF_COUNTS_H

#include "xyarray.h"

struct perf_counts_values {
	union {
		struct {
			u64 val;
			u64 ena;
			u64 run;
		};
		u64 values[3];
	};
};

struct perf_counts {
	s8			  scaled;
	struct perf_counts_values aggr;
	struct xyarray		  *values;
};


static inline struct perf_counts_values*
perf_counts(struct perf_counts *counts, int cpu, int thread)
{
	return xyarray__entry(counts->values, cpu, thread);
}

struct perf_counts *perf_counts__new(int ncpus, int nthreads);
void perf_counts__delete(struct perf_counts *counts);

void perf_evsel__reset_counts(struct perf_evsel *evsel);
int perf_evsel__alloc_counts(struct perf_evsel *evsel, int ncpus, int nthreads);
void perf_evsel__free_counts(struct perf_evsel *evsel);

#endif /* __PERF_COUNTS_H */
t-next.git</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='cb9c68363efb6d1f950ec55fb06e031ee70db5fc'/><select name='h' onchange='this.form.submit();'>
<option value='emaclite-cleanup'>emaclite-cleanup</option>
<option value='master' selected='selected'>master</option>
<option value='nds-private-remove'>nds-private-remove</option>
<option value='packet-loop-back'>packet-loop-back</option>
<option value='packet-rx-pump-back'>packet-rx-pump-back</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit.cgi/linux/net-next.git/'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?id=cb9c68363efb6d1f950ec55fb06e031ee70db5fc'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/include/drm/i2c/ch7006.h'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/include/drm/i2c/ch7006.h?id=cb9c68363efb6d1f950ec55fb06e031ee70db5fc'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/include/drm/i2c/ch7006.h?id=cb9c68363efb6d1f950ec55fb06e031ee70db5fc'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/include/drm/i2c/ch7006.h?id=cb9c68363efb6d1f950ec55fb06e031ee70db5fc'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/include/drm/i2c/ch7006.h'>
<input type='hidden' name='id' value='cb9c68363efb6d1f950ec55fb06e031ee70db5fc'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?id=cb9c68363efb6d1f950ec55fb06e031ee70db5fc'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/include?id=cb9c68363efb6d1f950ec55fb06e031ee70db5fc'>include</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/drm?id=cb9c68363efb6d1f950ec55fb06e031ee70db5fc'>drm</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/drm/i2c?id=cb9c68363efb6d1f950ec55fb06e031ee70db5fc'>i2c</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/drm/i2c/ch7006.h?id=cb9c68363efb6d1f950ec55fb06e031ee70db5fc'>ch7006.h</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/include/drm/i2c/ch7006.h?id=cb9c68363efb6d1f950ec55fb06e031ee70db5fc&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>