diff options
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index f6a43493d1d0..bbbadcc04097 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -77,9 +77,9 @@ static struct hists *perf_session__hists_findnew(struct perf_session *self, | |||
77 | return new; | 77 | return new; |
78 | } | 78 | } |
79 | 79 | ||
80 | static int perf_session__add_hist_entry(struct perf_session *self, | 80 | static int perf_session__add_hist_entry(struct perf_session *session, |
81 | struct addr_location *al, | 81 | struct addr_location *al, |
82 | struct sample_data *data) | 82 | struct perf_sample *sample) |
83 | { | 83 | { |
84 | struct symbol *parent = NULL; | 84 | struct symbol *parent = NULL; |
85 | int err = 0; | 85 | int err = 0; |
@@ -87,28 +87,28 @@ static int perf_session__add_hist_entry(struct perf_session *self, | |||
87 | struct hists *hists; | 87 | struct hists *hists; |
88 | struct perf_event_attr *attr; | 88 | struct perf_event_attr *attr; |
89 | 89 | ||
90 | if ((sort__has_parent || symbol_conf.use_callchain) && data->callchain) { | 90 | if ((sort__has_parent || symbol_conf.use_callchain) && sample->callchain) { |
91 | err = perf_session__resolve_callchain(self, al->thread, | 91 | err = perf_session__resolve_callchain(session, al->thread, |
92 | data->callchain, &parent); | 92 | sample->callchain, &parent); |
93 | if (err) | 93 | if (err) |
94 | return err; | 94 | return err; |
95 | } | 95 | } |
96 | 96 | ||
97 | attr = perf_header__find_attr(data->id, &self->header); | 97 | attr = perf_header__find_attr(sample->id, &session->header); |
98 | if (attr) | 98 | if (attr) |
99 | hists = perf_session__hists_findnew(self, data->id, attr->type, attr->config); | 99 | hists = perf_session__hists_findnew(session, sample->id, attr->type, attr->config); |
100 | else | 100 | else |
101 | hists = perf_session__hists_findnew(self, data->id, 0, 0); | 101 | hists = perf_session__hists_findnew(session, sample->id, 0, 0); |
102 | if (hists == NULL) | 102 | if (hists == NULL) |
103 | return -ENOMEM; | 103 | return -ENOMEM; |
104 | 104 | ||
105 | he = __hists__add_entry(hists, al, parent, data->period); | 105 | he = __hists__add_entry(hists, al, parent, sample->period); |
106 | if (he == NULL) | 106 | if (he == NULL) |
107 | return -ENOMEM; | 107 | return -ENOMEM; |
108 | 108 | ||
109 | if (symbol_conf.use_callchain) { | 109 | if (symbol_conf.use_callchain) { |
110 | err = callchain_append(he->callchain, &self->callchain_cursor, | 110 | err = callchain_append(he->callchain, &session->callchain_cursor, |
111 | data->period); | 111 | sample->period); |
112 | if (err) | 112 | if (err) |
113 | return err; | 113 | return err; |
114 | } | 114 | } |
@@ -124,32 +124,32 @@ static int perf_session__add_hist_entry(struct perf_session *self, | |||
124 | } | 124 | } |
125 | 125 | ||
126 | static int add_event_total(struct perf_session *session, | 126 | static int add_event_total(struct perf_session *session, |
127 | struct sample_data *data, | 127 | struct perf_sample *sample, |
128 | struct perf_event_attr *attr) | 128 | struct perf_event_attr *attr) |
129 | { | 129 | { |
130 | struct hists *hists; | 130 | struct hists *hists; |
131 | 131 | ||
132 | if (attr) | 132 | if (attr) |
133 | hists = perf_session__hists_findnew(session, data->id, | 133 | hists = perf_session__hists_findnew(session, sample->id, |
134 | attr->type, attr->config); | 134 | attr->type, attr->config); |
135 | else | 135 | else |
136 | hists = perf_session__hists_findnew(session, data->id, 0, 0); | 136 | hists = perf_session__hists_findnew(session, sample->id, 0, 0); |
137 | 137 | ||
138 | if (!hists) | 138 | if (!hists) |
139 | return -ENOMEM; | 139 | return -ENOMEM; |
140 | 140 | ||
141 | hists->stats.total_period += data->period; | 141 | hists->stats.total_period += sample->period; |
142 | /* | 142 | /* |
143 | * FIXME: add_event_total should be moved from here to | 143 | * FIXME: add_event_total should be moved from here to |
144 | * perf_session__process_event so that the proper hist is passed to | 144 | * perf_session__process_event so that the proper hist is passed to |
145 | * the event_op methods. | 145 | * the event_op methods. |
146 | */ | 146 | */ |
147 | hists__inc_nr_events(hists, PERF_RECORD_SAMPLE); | 147 | hists__inc_nr_events(hists, PERF_RECORD_SAMPLE); |
148 | session->hists.stats.total_period += data->period; | 148 | session->hists.stats.total_period += sample->period; |
149 | return 0; | 149 | return 0; |
150 | } | 150 | } |
151 | 151 | ||
152 | static int process_sample_event(event_t *event, struct sample_data *sample, | 152 | static int process_sample_event(event_t *event, struct perf_sample *sample, |
153 | struct perf_session *session) | 153 | struct perf_session *session) |
154 | { | 154 | { |
155 | struct addr_location al; | 155 | struct addr_location al; |
@@ -179,7 +179,7 @@ static int process_sample_event(event_t *event, struct sample_data *sample, | |||
179 | return 0; | 179 | return 0; |
180 | } | 180 | } |
181 | 181 | ||
182 | static int process_read_event(event_t *event, struct sample_data *sample __used, | 182 | static int process_read_event(event_t *event, struct perf_sample *sample __used, |
183 | struct perf_session *session __used) | 183 | struct perf_session *session __used) |
184 | { | 184 | { |
185 | struct perf_event_attr *attr; | 185 | struct perf_event_attr *attr; |