projects
/
linux-2.6-block.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Merge tag 'pm+acpi-3.15-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafae...
[linux-2.6-block.git]
/
tools
/
perf
/
util
/
perf_regs.c
1
#include <errno.h>
2
#include "perf_regs.h"
3
4
int perf_reg_value(u64 *valp, struct regs_dump *regs, int id)
5
{
6
int i, idx = 0;
7
u64 mask = regs->mask;
8
9
if (!(mask & (1 << id)))
10
return -EINVAL;
11
12
for (i = 0; i < id; i++) {
13
if (mask & (1 << i))
14
idx++;
15
}
16
17
*valp = regs->regs[idx];
18
return 0;
19
}