Lines Matching full:data
27 static char const *input_name = "perf.data";
124 struct alloc_stat *data = NULL;
128 data = rb_entry(*node, struct alloc_stat, node);
130 if (ptr > data->ptr)
132 else if (ptr < data->ptr)
138 if (data && data->ptr == ptr) {
139 data->hit++;
140 data->bytes_req += bytes_req;
141 data->bytes_alloc += bytes_alloc;
143 data = malloc(sizeof(*data));
144 if (!data)
146 data->ptr = ptr;
147 data->pingpong = 0;
148 data->hit = 1;
149 data->bytes_req = bytes_req;
150 data->bytes_alloc = bytes_alloc;
152 rb_link_node(&data->node, parent, node);
153 rb_insert_color(&data->node, &root_alloc_stat);
155 data->call_site = call_site;
156 data->alloc_cpu = cpu;
164 struct alloc_stat *data = NULL;
168 data = rb_entry(*node, struct alloc_stat, node);
170 if (call_site > data->call_site)
172 else if (call_site < data->call_site)
178 if (data && data->call_site == call_site) {
179 data->hit++;
180 data->bytes_req += bytes_req;
181 data->bytes_alloc += bytes_alloc;
183 data = malloc(sizeof(*data));
184 if (!data)
186 data->call_site = call_site;
187 data->pingpong = 0;
188 data->hit = 1;
189 data->bytes_req = bytes_req;
190 data->bytes_alloc = bytes_alloc;
192 rb_link_node(&data->node, parent, node);
193 rb_insert_color(&data->node, &root_caller_stat);
197 static void process_alloc_event(void *data,
210 ptr = raw_field_value(event, "ptr", data);
211 call_site = raw_field_value(event, "call_site", data);
212 bytes_req = raw_field_value(event, "bytes_req", data);
213 bytes_alloc = raw_field_value(event, "bytes_alloc", data);
223 node2 = raw_field_value(event, "node", data);
242 struct alloc_stat *data;
245 data = rb_entry(node, struct alloc_stat, node);
247 cmp = sort_fn(&key, data);
253 return data;
258 static void process_free_event(void *data,
267 ptr = raw_field_value(event, "ptr", data);
284 static void process_raw_event(union perf_event *raw_event __used, void *data,
290 type = trace_parse_common_type(data);
295 process_alloc_event(data, event, cpu, timestamp, thread, 0);
301 process_alloc_event(data, event, cpu, timestamp, thread, 1);
307 process_free_event(data, event, cpu, timestamp, thread);
366 struct alloc_stat *data = rb_entry(next, struct alloc_stat,
374 addr = data->call_site;
378 addr = data->ptr;
388 (unsigned long long)data->bytes_alloc,
389 (unsigned long)data->bytes_alloc / data->hit,
390 (unsigned long long)data->bytes_req,
391 (unsigned long)data->bytes_req / data->hit,
392 (unsigned long)data->hit,
393 (unsigned long)data->pingpong,
394 fragmentation(data->bytes_req, data->bytes_alloc));
435 static void sort_insert(struct rb_root *root, struct alloc_stat *data,
450 cmp = sort->cmp(data, this);
461 rb_link_node(&data->node, parent, new);
462 rb_insert_color(&data->node, root);
469 struct alloc_stat *data;
477 data = rb_entry(node, struct alloc_stat, node);
478 sort_insert(root_sorted, data, sort_list);