Lines Matching full:mem

15 #include "util/mem-events.h"
40 struct perf_mem *mem = *(struct perf_mem **)opt->value; in parse_record_events() local
49 mem->operation = 0; in parse_record_events()
54 "perf mem record [<options>] [<command>]",
55 "perf mem record [<options>] -- <command> [<options>]",
61 static int __cmd_record(int argc, const char **argv, struct perf_mem *mem) in __cmd_record() argument
68 OPT_CALLBACK('e', "event", &mem, "event", in __cmd_record()
69 "event selector. use 'perf mem record -e list' to list available events", in __cmd_record()
71 OPT_UINTEGER(0, "ldlat", &perf_mem_events__loads_ldlat, "mem-loads latency"), in __cmd_record()
89 if (mem->operation & MEM_OPERATION_LOAD) in __cmd_record()
92 if (mem->operation & MEM_OPERATION_STORE) in __cmd_record()
100 if (mem->phys_addr) in __cmd_record()
148 struct perf_mem *mem = container_of(tool, struct perf_mem, tool); in dump_raw_samples() local
158 if (al.filtered || (mem->hide_unresolved && al.sym == NULL)) in dump_raw_samples()
164 if (mem->phys_addr) { in dump_raw_samples()
232 static int report_raw_events(struct perf_mem *mem) in report_raw_events() argument
237 .force = mem->force, in report_raw_events()
241 &mem->tool); in report_raw_events()
246 if (mem->cpu_list) { in report_raw_events()
247 ret = perf_session__cpu_bitmap(session, mem->cpu_list, in report_raw_events()
248 mem->cpu_bitmap); in report_raw_events()
257 if (mem->phys_addr) in report_raw_events()
269 static int report_events(int argc, const char **argv, struct perf_mem *mem) in report_events() argument
274 if (mem->dump_raw) in report_events()
275 return report_raw_events(mem); in report_events()
283 rep_argv[i++] = "--mem-mode"; in report_events()
290 if (!(mem->operation & MEM_OPERATION_LOAD)) { in report_events()
291 if (mem->phys_addr) in report_events()
292 rep_argv[i++] = "--sort=mem,sym,dso,symbol_daddr," in report_events()
295 rep_argv[i++] = "--sort=mem,sym,dso,symbol_daddr," in report_events()
297 } else if (mem->phys_addr) in report_events()
298 rep_argv[i++] = "--sort=local_weight,mem,sym,dso,symbol_daddr," in report_events()
381 struct perf_mem mem = { in cmd_mem() local
400 OPT_CALLBACK('t', "type", &mem.operation, in cmd_mem()
403 OPT_BOOLEAN('D', "dump-raw-samples", &mem.dump_raw, in cmd_mem()
405 OPT_BOOLEAN('U', "hide-unresolved", &mem.hide_unresolved, in cmd_mem()
409 OPT_STRING('C', "cpu", &mem.cpu_list, "cpu", in cmd_mem()
415 OPT_BOOLEAN('f', "force", &mem.force, "don't complain, do it"), in cmd_mem()
416 OPT_BOOLEAN('p', "phys-data", &mem.phys_addr, "Record/Report sample physical addresses"), in cmd_mem()
433 if (!argc || !(strncmp(argv[0], "rec", 3) || mem.operation)) in cmd_mem()
436 if (!mem.input_name || !strlen(mem.input_name)) { in cmd_mem()
438 mem.input_name = "-"; in cmd_mem()
440 mem.input_name = "perf.data"; in cmd_mem()
444 return __cmd_record(argc, argv, &mem); in cmd_mem()
446 return report_events(argc, argv, &mem); in cmd_mem()