perf session: Add ability to skip 4GiB or more
A session can be made to skip portions of the input file. Do not limit that size to 32-bits. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1406143198-20732-2-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
6f917c7099
commit
d5652d865e
1 changed files with 8 additions and 7 deletions
|
@ -994,8 +994,10 @@ static int perf_session_deliver_event(struct perf_session *session,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int perf_session__process_user_event(struct perf_session *session, union perf_event *event,
|
static s64 perf_session__process_user_event(struct perf_session *session,
|
||||||
struct perf_tool *tool, u64 file_offset)
|
union perf_event *event,
|
||||||
|
struct perf_tool *tool,
|
||||||
|
u64 file_offset)
|
||||||
{
|
{
|
||||||
int fd = perf_data_file__fd(session->file);
|
int fd = perf_data_file__fd(session->file);
|
||||||
int err;
|
int err;
|
||||||
|
@ -1037,7 +1039,7 @@ static void event_swap(union perf_event *event, bool sample_id_all)
|
||||||
swap(event, sample_id_all);
|
swap(event, sample_id_all);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int perf_session__process_event(struct perf_session *session,
|
static s64 perf_session__process_event(struct perf_session *session,
|
||||||
union perf_event *event,
|
union perf_event *event,
|
||||||
struct perf_tool *tool,
|
struct perf_tool *tool,
|
||||||
u64 file_offset)
|
u64 file_offset)
|
||||||
|
@ -1148,7 +1150,7 @@ static int __perf_session__process_pipe_events(struct perf_session *session,
|
||||||
union perf_event *event;
|
union perf_event *event;
|
||||||
uint32_t size, cur_size = 0;
|
uint32_t size, cur_size = 0;
|
||||||
void *buf = NULL;
|
void *buf = NULL;
|
||||||
int skip = 0;
|
s64 skip = 0;
|
||||||
u64 head;
|
u64 head;
|
||||||
ssize_t err;
|
ssize_t err;
|
||||||
void *p;
|
void *p;
|
||||||
|
@ -1277,14 +1279,13 @@ int __perf_session__process_events(struct perf_session *session,
|
||||||
u64 file_size, struct perf_tool *tool)
|
u64 file_size, struct perf_tool *tool)
|
||||||
{
|
{
|
||||||
int fd = perf_data_file__fd(session->file);
|
int fd = perf_data_file__fd(session->file);
|
||||||
u64 head, page_offset, file_offset, file_pos;
|
u64 head, page_offset, file_offset, file_pos, size;
|
||||||
int err, mmap_prot, mmap_flags, map_idx = 0;
|
int err, mmap_prot, mmap_flags, map_idx = 0;
|
||||||
size_t mmap_size;
|
size_t mmap_size;
|
||||||
char *buf, *mmaps[NUM_MMAPS];
|
char *buf, *mmaps[NUM_MMAPS];
|
||||||
union perf_event *event;
|
union perf_event *event;
|
||||||
uint32_t size;
|
|
||||||
struct ui_progress prog;
|
struct ui_progress prog;
|
||||||
int skip;
|
s64 skip;
|
||||||
|
|
||||||
perf_tool__fill_defaults(tool);
|
perf_tool__fill_defaults(tool);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue