Lines Matching defs:entry
130 * buffer. Struct entry can be uninitialized. The function reserves a
138 *op_cpu_buffer_write_reserve(struct op_entry *entry, unsigned long size)
140 entry->event = ring_buffer_lock_reserve
142 size * sizeof(entry->sample->data[0]));
143 if (!entry->event)
145 entry->sample = ring_buffer_event_data(entry->event);
146 entry->size = size;
147 entry->data = entry->sample->data;
149 return entry->sample;
152 int op_cpu_buffer_write_commit(struct op_entry *entry)
154 return ring_buffer_unlock_commit(op_ring_buffer, entry->event);
157 struct op_sample *op_cpu_buffer_read_entry(struct op_entry *entry, int cpu)
164 entry->event = e;
165 entry->sample = ring_buffer_event_data(e);
166 entry->size = (ring_buffer_event_length(e) - sizeof(struct op_sample))
167 / sizeof(entry->sample->data[0]);
168 entry->data = entry->sample->data;
169 return entry->sample;
181 struct op_entry entry;
215 sample = op_cpu_buffer_write_reserve(&entry, size);
223 op_cpu_buffer_add_data(&entry, (unsigned long)task);
225 op_cpu_buffer_write_commit(&entry);
234 struct op_entry entry;
237 sample = op_cpu_buffer_write_reserve(&entry, 0);
244 return op_cpu_buffer_write_commit(&entry);
337 * Use oprofile_add_data(&entry, val) to add data and
338 * oprofile_write_commit(&entry) to commit the sample.
341 oprofile_write_reserve(struct op_entry *entry, struct pt_regs * const regs,
354 sample = op_cpu_buffer_write_reserve(entry, size + 2);
360 op_cpu_buffer_add_data(entry, code);
361 op_cpu_buffer_add_data(entry, pc);
366 entry->event = NULL;
370 int oprofile_add_data(struct op_entry *entry, unsigned long val)
372 if (!entry->event)
374 return op_cpu_buffer_add_data(entry, val);
377 int oprofile_add_data64(struct op_entry *entry, u64 val)
379 if (!entry->event)
381 if (op_cpu_buffer_get_size(entry) < 2)
387 if (!op_cpu_buffer_add_data(entry, (u32)val))
389 return op_cpu_buffer_add_data(entry, (u32)(val >> 32));
392 int oprofile_write_commit(struct op_entry *entry)
394 if (!entry->event)
396 return op_cpu_buffer_write_commit(entry);