auxtrace.c (351a1f5c8afa13ea5cfcdae543f6596ef8ebdbd9) auxtrace.c (a583053299c1e66e6202b494cbc3acd93cedc4cc)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * auxtrace.c: AUX area trace support
4 * Copyright (c) 2013-2015, Intel Corporation.
5 */
6
7#include <inttypes.h>
8#include <sys/types.h>

--- 1214 unchanged lines hidden (view full) ---

1223{
1224 if (auxtrace__dont_decode(session))
1225 return 0;
1226
1227 perf_event__fprintf_auxtrace_error(event, stdout);
1228 return 0;
1229}
1230
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * auxtrace.c: AUX area trace support
4 * Copyright (c) 2013-2015, Intel Corporation.
5 */
6
7#include <inttypes.h>
8#include <sys/types.h>

--- 1214 unchanged lines hidden (view full) ---

1223{
1224 if (auxtrace__dont_decode(session))
1225 return 0;
1226
1227 perf_event__fprintf_auxtrace_error(event, stdout);
1228 return 0;
1229}
1230
1231static int __auxtrace_mmap__read(struct perf_mmap *map,
1231static int __auxtrace_mmap__read(struct mmap *map,
1232 struct auxtrace_record *itr,
1233 struct perf_tool *tool, process_auxtrace_t fn,
1234 bool snapshot, size_t snapshot_size)
1235{
1236 struct auxtrace_mmap *mm = &map->auxtrace_mmap;
1237 u64 head, old = mm->prev, offset, ref;
1238 unsigned char *data = mm->base;
1239 size_t size, head_off, old_off, len1, len2, padding;

--- 94 unchanged lines hidden (view full) ---

1334 if (err < 0)
1335 return err;
1336 }
1337 }
1338
1339 return 1;
1340}
1341
1232 struct auxtrace_record *itr,
1233 struct perf_tool *tool, process_auxtrace_t fn,
1234 bool snapshot, size_t snapshot_size)
1235{
1236 struct auxtrace_mmap *mm = &map->auxtrace_mmap;
1237 u64 head, old = mm->prev, offset, ref;
1238 unsigned char *data = mm->base;
1239 size_t size, head_off, old_off, len1, len2, padding;

--- 94 unchanged lines hidden (view full) ---

1334 if (err < 0)
1335 return err;
1336 }
1337 }
1338
1339 return 1;
1340}
1341
1342int auxtrace_mmap__read(struct perf_mmap *map, struct auxtrace_record *itr,
1342int auxtrace_mmap__read(struct mmap *map, struct auxtrace_record *itr,
1343 struct perf_tool *tool, process_auxtrace_t fn)
1344{
1345 return __auxtrace_mmap__read(map, itr, tool, fn, false, 0);
1346}
1347
1343 struct perf_tool *tool, process_auxtrace_t fn)
1344{
1345 return __auxtrace_mmap__read(map, itr, tool, fn, false, 0);
1346}
1347
1348int auxtrace_mmap__read_snapshot(struct perf_mmap *map,
1348int auxtrace_mmap__read_snapshot(struct mmap *map,
1349 struct auxtrace_record *itr,
1350 struct perf_tool *tool, process_auxtrace_t fn,
1351 size_t snapshot_size)
1352{
1353 return __auxtrace_mmap__read(map, itr, tool, fn, true, snapshot_size);
1354}
1355
1356/**

--- 877 unchanged lines hidden ---
1349 struct auxtrace_record *itr,
1350 struct perf_tool *tool, process_auxtrace_t fn,
1351 size_t snapshot_size)
1352{
1353 return __auxtrace_mmap__read(map, itr, tool, fn, true, snapshot_size);
1354}
1355
1356/**

--- 877 unchanged lines hidden ---