Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156632
b: refs/heads/master
c: 3a43ce6
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Aug 9, 2009
1 parent 20d611b commit e50825e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 10b8e3066066708f304e0fc5cfe658e05abf943d
refs/heads/master: 3a43ce68ae1758fa6a839386025ef45acb6baa22
10 changes: 5 additions & 5 deletions trunk/include/linux/perf_counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ enum perf_counter_sample_format {
PERF_SAMPLE_CPU = 1U << 7,
PERF_SAMPLE_PERIOD = 1U << 8,
PERF_SAMPLE_STREAM_ID = 1U << 9,
PERF_SAMPLE_TP_RECORD = 1U << 10,
PERF_SAMPLE_RAW = 1U << 10,

PERF_SAMPLE_MAX = 1U << 11, /* non-ABI */
};
Expand Down Expand Up @@ -414,9 +414,9 @@ struct perf_callchain_entry {
__u64 ip[PERF_MAX_STACK_DEPTH];
};

struct perf_tracepoint_record {
int size;
char *record;
struct perf_raw_record {
u32 size;
void *data;
};

struct task_struct;
Expand Down Expand Up @@ -687,7 +687,7 @@ struct perf_sample_data {
struct pt_regs *regs;
u64 addr;
u64 period;
void *private;
struct perf_raw_record *raw;
};

extern int perf_counter_overflow(struct perf_counter *counter, int nmi,
Expand Down
20 changes: 10 additions & 10 deletions trunk/kernel/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2646,7 +2646,7 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
u64 counter;
} group_entry;
struct perf_callchain_entry *callchain = NULL;
struct perf_tracepoint_record *tp = NULL;
struct perf_raw_record *raw = NULL;
int callchain_size = 0;
u64 time;
struct {
Expand Down Expand Up @@ -2715,10 +2715,10 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
header.size += sizeof(u64);
}

if (sample_type & PERF_SAMPLE_TP_RECORD) {
tp = data->private;
if (tp)
header.size += tp->size;
if (sample_type & PERF_SAMPLE_RAW) {
raw = data->raw;
if (raw)
header.size += raw->size;
}

ret = perf_output_begin(&handle, counter, header.size, nmi, 1);
Expand Down Expand Up @@ -2784,8 +2784,8 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
}
}

if ((sample_type & PERF_SAMPLE_TP_RECORD) && tp)
perf_output_copy(&handle, tp->record, tp->size);
if ((sample_type & PERF_SAMPLE_RAW) && raw)
perf_output_copy(&handle, raw->data, raw->size);

perf_output_end(&handle);
}
Expand Down Expand Up @@ -3740,15 +3740,15 @@ static const struct pmu perf_ops_task_clock = {
void perf_tpcounter_event(int event_id, u64 addr, u64 count, void *record,
int entry_size)
{
struct perf_tracepoint_record tp = {
struct perf_raw_record raw = {
.size = entry_size,
.record = record,
.data = record,
};

struct perf_sample_data data = {
.regs = get_irq_regs(),
.addr = addr,
.private = &tp,
.raw = &raw,
};

if (!data.regs)
Expand Down

0 comments on commit e50825e

Please sign in to comment.