diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-06-02 13:22:16 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-02 15:45:33 -0400 |
commit | 0d48696f87e3618b0d35bd3e4e9d7c188d51e7de (patch) | |
tree | 633d37089c368c0cc2c4f8120014d57df215bb53 /include/linux | |
parent | 08247e31ca79b8f02cce47b7e8120797a8726606 (diff) |
perf_counter: Rename perf_counter_hw_event => perf_counter_attr
The structure isn't hw only and when I read event, I think about those
things that fall out the other end. Rename the thing.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>
Cc: Stephane Eranian <eranian@googlemail.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/perf_counter.h | 34 | ||||
-rw-r--r-- | include/linux/syscalls.h | 4 |
2 files changed, 19 insertions, 19 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index 45bdd3b95d3e..37d5541d74cb 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -22,7 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * hw_event.type | 25 | * attr.type |
26 | */ | 26 | */ |
27 | enum perf_event_types { | 27 | enum perf_event_types { |
28 | PERF_TYPE_HARDWARE = 0, | 28 | PERF_TYPE_HARDWARE = 0, |
@@ -37,10 +37,10 @@ enum perf_event_types { | |||
37 | }; | 37 | }; |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * Generalized performance counter event types, used by the hw_event.event_id | 40 | * Generalized performance counter event types, used by the attr.event_id |
41 | * parameter of the sys_perf_counter_open() syscall: | 41 | * parameter of the sys_perf_counter_open() syscall: |
42 | */ | 42 | */ |
43 | enum hw_event_ids { | 43 | enum attr_ids { |
44 | /* | 44 | /* |
45 | * Common hardware events, generalized by the kernel: | 45 | * Common hardware events, generalized by the kernel: |
46 | */ | 46 | */ |
@@ -94,7 +94,7 @@ enum sw_event_ids { | |||
94 | #define PERF_COUNTER_EVENT_MASK __PERF_COUNTER_MASK(EVENT) | 94 | #define PERF_COUNTER_EVENT_MASK __PERF_COUNTER_MASK(EVENT) |
95 | 95 | ||
96 | /* | 96 | /* |
97 | * Bits that can be set in hw_event.sample_type to request information | 97 | * Bits that can be set in attr.sample_type to request information |
98 | * in the overflow packets. | 98 | * in the overflow packets. |
99 | */ | 99 | */ |
100 | enum perf_counter_sample_format { | 100 | enum perf_counter_sample_format { |
@@ -109,7 +109,7 @@ enum perf_counter_sample_format { | |||
109 | }; | 109 | }; |
110 | 110 | ||
111 | /* | 111 | /* |
112 | * Bits that can be set in hw_event.read_format to request that | 112 | * Bits that can be set in attr.read_format to request that |
113 | * reads on the counter should return the indicated quantities, | 113 | * reads on the counter should return the indicated quantities, |
114 | * in increasing order of bit value, after the counter value. | 114 | * in increasing order of bit value, after the counter value. |
115 | */ | 115 | */ |
@@ -122,7 +122,7 @@ enum perf_counter_read_format { | |||
122 | /* | 122 | /* |
123 | * Hardware event to monitor via a performance monitoring counter: | 123 | * Hardware event to monitor via a performance monitoring counter: |
124 | */ | 124 | */ |
125 | struct perf_counter_hw_event { | 125 | struct perf_counter_attr { |
126 | /* | 126 | /* |
127 | * The MSB of the config word signifies if the rest contains cpu | 127 | * The MSB of the config word signifies if the rest contains cpu |
128 | * specific (raw) counter configuration data, if unset, the next | 128 | * specific (raw) counter configuration data, if unset, the next |
@@ -323,25 +323,25 @@ enum perf_event_type { | |||
323 | 323 | ||
324 | struct task_struct; | 324 | struct task_struct; |
325 | 325 | ||
326 | static inline u64 perf_event_raw(struct perf_counter_hw_event *hw_event) | 326 | static inline u64 perf_event_raw(struct perf_counter_attr *attr) |
327 | { | 327 | { |
328 | return hw_event->config & PERF_COUNTER_RAW_MASK; | 328 | return attr->config & PERF_COUNTER_RAW_MASK; |
329 | } | 329 | } |
330 | 330 | ||
331 | static inline u64 perf_event_config(struct perf_counter_hw_event *hw_event) | 331 | static inline u64 perf_event_config(struct perf_counter_attr *attr) |
332 | { | 332 | { |
333 | return hw_event->config & PERF_COUNTER_CONFIG_MASK; | 333 | return attr->config & PERF_COUNTER_CONFIG_MASK; |
334 | } | 334 | } |
335 | 335 | ||
336 | static inline u64 perf_event_type(struct perf_counter_hw_event *hw_event) | 336 | static inline u64 perf_event_type(struct perf_counter_attr *attr) |
337 | { | 337 | { |
338 | return (hw_event->config & PERF_COUNTER_TYPE_MASK) >> | 338 | return (attr->config & PERF_COUNTER_TYPE_MASK) >> |
339 | PERF_COUNTER_TYPE_SHIFT; | 339 | PERF_COUNTER_TYPE_SHIFT; |
340 | } | 340 | } |
341 | 341 | ||
342 | static inline u64 perf_event_id(struct perf_counter_hw_event *hw_event) | 342 | static inline u64 perf_event_id(struct perf_counter_attr *attr) |
343 | { | 343 | { |
344 | return hw_event->config & PERF_COUNTER_EVENT_MASK; | 344 | return attr->config & PERF_COUNTER_EVENT_MASK; |
345 | } | 345 | } |
346 | 346 | ||
347 | /** | 347 | /** |
@@ -457,7 +457,7 @@ struct perf_counter { | |||
457 | u64 tstamp_running; | 457 | u64 tstamp_running; |
458 | u64 tstamp_stopped; | 458 | u64 tstamp_stopped; |
459 | 459 | ||
460 | struct perf_counter_hw_event hw_event; | 460 | struct perf_counter_attr attr; |
461 | struct hw_perf_counter hw; | 461 | struct hw_perf_counter hw; |
462 | 462 | ||
463 | struct perf_counter_context *ctx; | 463 | struct perf_counter_context *ctx; |
@@ -605,8 +605,8 @@ extern int perf_counter_overflow(struct perf_counter *counter, | |||
605 | */ | 605 | */ |
606 | static inline int is_software_counter(struct perf_counter *counter) | 606 | static inline int is_software_counter(struct perf_counter *counter) |
607 | { | 607 | { |
608 | return !perf_event_raw(&counter->hw_event) && | 608 | return !perf_event_raw(&counter->attr) && |
609 | perf_event_type(&counter->hw_event) != PERF_TYPE_HARDWARE; | 609 | perf_event_type(&counter->attr) != PERF_TYPE_HARDWARE; |
610 | } | 610 | } |
611 | 611 | ||
612 | extern void perf_swcounter_event(u32, u64, int, struct pt_regs *, u64); | 612 | extern void perf_swcounter_event(u32, u64, int, struct pt_regs *, u64); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 79faae950e2e..c6c84ad8bd71 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -55,7 +55,7 @@ struct compat_timeval; | |||
55 | struct robust_list_head; | 55 | struct robust_list_head; |
56 | struct getcpu_cache; | 56 | struct getcpu_cache; |
57 | struct old_linux_dirent; | 57 | struct old_linux_dirent; |
58 | struct perf_counter_hw_event; | 58 | struct perf_counter_attr; |
59 | 59 | ||
60 | #include <linux/types.h> | 60 | #include <linux/types.h> |
61 | #include <linux/aio_abi.h> | 61 | #include <linux/aio_abi.h> |
@@ -758,6 +758,6 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[]); | |||
758 | 758 | ||
759 | 759 | ||
760 | asmlinkage long sys_perf_counter_open( | 760 | asmlinkage long sys_perf_counter_open( |
761 | const struct perf_counter_hw_event __user *hw_event_uptr, | 761 | const struct perf_counter_attr __user *attr_uptr, |
762 | pid_t pid, int cpu, int group_fd, unsigned long flags); | 762 | pid_t pid, int cpu, int group_fd, unsigned long flags); |
763 | #endif | 763 | #endif |