<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/perf/util/session.c, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-04-13T18:03:18Z</updated>
<entry>
<title>perf session: Remap buf if there is no space for event</title>
<updated>2022-04-13T18:03:18Z</updated>
<author>
<name>Denis Nikitin</name>
</author>
<published>2022-03-30T03:11:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3bc738a5e94aeff35099c8a0a87736d011e84635'/>
<id>urn:sha1:3bc738a5e94aeff35099c8a0a87736d011e84635</id>
<content type='text'>
[ Upstream commit bc21e74d4775f883ae1f542c1f1dc7205b15d925 ]

If a perf event doesn't fit into remaining buffer space return NULL to
remap buf and fetch the event again.

Keep the logic to error out on inadequate input from fuzzing.

This fixes perf failing on ChromeOS (with 32b userspace):

  $ perf report -v -i perf.data
  ...
  prefetch_event: head=0x1fffff8 event-&gt;header_size=0x30, mmap_size=0x2000000: fuzzed or compressed perf.data?
  Error:
  failed to process sample

Fixes: 57fc032ad643ffd0 ("perf session: Avoid infinite loop when seeing invalid header.size")
Reviewed-by: James Clark &lt;james.clark@arm.com&gt;
Signed-off-by: Denis Nikitin &lt;denik@chromium.org&gt;
Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Alexey Budankov &lt;alexey.budankov@linux.intel.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: https://lore.kernel.org/r/20220330031130.2152327-1-denik@chromium.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'torvalds/master' into perf/core</title>
<updated>2021-10-26T14:03:02Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2021-10-26T14:03:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a55445f11e6b1dbdc1e7f2684a519089d2e163c'/>
<id>urn:sha1:3a55445f11e6b1dbdc1e7f2684a519089d2e163c</id>
<content type='text'>
To pick up the fixes from upstream.

Fix simple conflict on session.c related to the file position fix that
went upstream and is touched by the active decomp changes in perf/core.

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf session: Introduce reader EOF function</title>
<updated>2021-10-25T16:47:41Z</updated>
<author>
<name>Alexey Bayduraev</name>
</author>
<published>2021-10-13T09:06:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=25900ea85ceef35e19234682e7c9dfc8ca2addbe'/>
<id>urn:sha1:25900ea85ceef35e19234682e7c9dfc8ca2addbe</id>
<content type='text'>
Introduce function to check end-of-file status.

Reviewed-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Signed-off-by: Alexey Bayduraev &lt;alexey.v.bayduraev@linux.intel.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Antonov &lt;alexander.antonov@linux.intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Alexei Budankov &lt;abudankov@huawei.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Link: https://lore.kernel.org/r/b3b0e0904da01f9ec84d4ae9368df99ecd231598.1634113027.git.alexey.v.bayduraev@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf session: Introduce reader return codes</title>
<updated>2021-10-25T16:47:41Z</updated>
<author>
<name>Alexey Bayduraev</name>
</author>
<published>2021-10-13T09:06:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4c0028864cd937ae604f0d62282899108061a6f1'/>
<id>urn:sha1:4c0028864cd937ae604f0d62282899108061a6f1</id>
<content type='text'>
Add READER_OK and READER_NODATA return codes to make the code more
clear.

Suggested-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Reviewed-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Reviewed-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Signed-off-by: Alexey Bayduraev &lt;alexey.v.bayduraev@linux.intel.com&gt;
Tested-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Antonov &lt;alexander.antonov@linux.intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Alexei Budankov &lt;abudankov@huawei.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/5fca481e91c3c5d2ba033d4c6e9b969f8033ab0f.1634113027.git.alexey.v.bayduraev@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf session: Move the event read code to a separate function</title>
<updated>2021-10-25T16:47:41Z</updated>
<author>
<name>Alexey Bayduraev</name>
</author>
<published>2021-10-13T09:06:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c10dc9244fe37855002f43297ff338d0fd253e2'/>
<id>urn:sha1:5c10dc9244fe37855002f43297ff338d0fd253e2</id>
<content type='text'>
Separate the reading code of a single event to a new
reader__read_event() function.

Suggested-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Reviewed-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Reviewed-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Signed-off-by: Alexey Bayduraev &lt;alexey.v.bayduraev@linux.intel.com&gt;
Tested-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Antonov &lt;alexander.antonov@linux.intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Alexei Budankov &lt;abudankov@huawei.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/ffe570d937138dd24f282978ce7ed9c46a06ff9b.1634113027.git.alexey.v.bayduraev@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf session: Move unmap code to reader__mmap</title>
<updated>2021-10-25T16:47:41Z</updated>
<author>
<name>Alexey Bayduraev</name>
</author>
<published>2021-10-13T09:06:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de096489d00f7764934906d0b6688783be6b9dc0'/>
<id>urn:sha1:de096489d00f7764934906d0b6688783be6b9dc0</id>
<content type='text'>
Move the unmapping code to reader__mmap(), so that the mmap code is
located together.

Move the head/file_offset computation to reader__mmap(), so all the
offset computation is located together and in one place only.

Suggested-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Reviewed-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Reviewed-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Signed-off-by: Alexey Bayduraev &lt;alexey.v.bayduraev@linux.intel.com&gt;
Tested-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Antonov &lt;alexander.antonov@linux.intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Alexei Budankov &lt;abudankov@huawei.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/f1c5e17cfa1ecfe912d10b411be203b55d148bc7.1634113027.git.alexey.v.bayduraev@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf session: Move reader map code to a separate function</title>
<updated>2021-10-25T16:47:41Z</updated>
<author>
<name>Alexey Bayduraev</name>
</author>
<published>2021-10-13T09:06:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=06763e7b30d9b502c48ad982851a195781aeff81'/>
<id>urn:sha1:06763e7b30d9b502c48ad982851a195781aeff81</id>
<content type='text'>
Move the mapping code into a separate reader__mmap() function.

Suggested-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Reviewed-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Reviewed-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Signed-off-by: Alexey Bayduraev &lt;alexey.v.bayduraev@linux.intel.com&gt;
Tested-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Antonov &lt;alexander.antonov@linux.intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Alexei Budankov &lt;abudankov@huawei.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/e445de5bb85bbd91287986802d6ed0ce1b419b5a.1634113027.git.alexey.v.bayduraev@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf session: Move init/release code to separate functions</title>
<updated>2021-10-25T16:47:41Z</updated>
<author>
<name>Alexey Bayduraev</name>
</author>
<published>2021-10-13T09:06:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5965063094944be751a7bff6ccd3e404c14b65cc'/>
<id>urn:sha1:5965063094944be751a7bff6ccd3e404c14b65cc</id>
<content type='text'>
Separate init/release code into reader__init() and reader__release_decomp()
functions.

Remove a duplicate call to ui_progress__init_size(), the same call can
be found in __perf_session__process_events().

For multiple traces ui_progress should be initialized by total size
before reader__init() calls.

Suggested-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Reviewed-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Reviewed-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Signed-off-by: Alexey Bayduraev &lt;alexey.v.bayduraev@linux.intel.com&gt;
Tested-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Antonov &lt;alexander.antonov@linux.intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Alexei Budankov &lt;abudankov@huawei.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/8bacf247de220be8e57af1d2b796322175f5e257.1634113027.git.alexey.v.bayduraev@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf session: Introduce decompressor in reader object</title>
<updated>2021-10-25T16:47:41Z</updated>
<author>
<name>Alexey Bayduraev</name>
</author>
<published>2021-10-13T09:06:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a3535e67dfdc29b4a2b455220244fb776f1df61'/>
<id>urn:sha1:3a3535e67dfdc29b4a2b455220244fb776f1df61</id>
<content type='text'>
Introduce a decompressor data structure with pointers to decomp
objects and to zstd object.

We cannot just move session-&gt;zstd_data to decomp_data as
session-&gt;zstd_data is not only used for decompression.

Adding decompressor data object to reader object and introducing
active_decomp into perf_session object to select current decompressor.

Thus decompression could be executed separately for each data file.

Reviewed-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Reviewed-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Signed-off-by: Alexey Bayduraev &lt;alexey.v.bayduraev@linux.intel.com&gt;
Tested-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Antonov &lt;alexander.antonov@linux.intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Alexei Budankov &lt;abudankov@huawei.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/0eee270cb52aebcbd029c8445d9009fd17709d53.1634113027.git.alexey.v.bayduraev@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf session: Move all state items to reader object</title>
<updated>2021-10-25T16:47:41Z</updated>
<author>
<name>Alexey Bayduraev</name>
</author>
<published>2021-10-13T09:06:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=529b6fbca03e1d8c101d041ffda5cc90e8f3fa4c'/>
<id>urn:sha1:529b6fbca03e1d8c101d041ffda5cc90e8f3fa4c</id>
<content type='text'>
We need all the state info about reader in separate object to load data
from multiple files, so we can keep multiple readers at the same time.
Moving all items that need to be kept from reader__process_events to
the reader object. Introducing mmap_cur to keep current mapping.

Suggested-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Reviewed-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Reviewed-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Signed-off-by: Alexey Bayduraev &lt;alexey.v.bayduraev@linux.intel.com&gt;
Tested-by: Riccardo Mancini &lt;rickyman7@gmail.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Antonov &lt;alexander.antonov@linux.intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Alexei Budankov &lt;abudankov@huawei.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/5c7bdebfaadd7fcb729bd999b181feccaa292e8e.1634113027.git.alexey.v.bayduraev@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
