Linux-perf-users Archive on lore.kernel.org
 help / color / Atom feed
* Re: Perf raw sample overflows perf record
       [not found] <29be54b5-5872-33ac-7c8e-998d77226a0a@amazon.com>
@ 2020-10-27  5:08 ` Namhyung Kim
  0 siblings, 0 replies; only message in thread
From: Namhyung Kim @ 2020-10-27  5:08 UTC (permalink / raw)
  To: George Prekas; +Cc: linux-perf-users, linux-kernel

+ LKML

On Sat, Oct 24, 2020 at 8:44 AM George Prekas <prekageo@amazon.com> wrote:
>
> The header of a perf sample has a u16 field for the size of the record.
> On the other hand, a PERF_SAMPLE_RAW has a u32 field for its size.
>
> I've written a test perf driver that creates large raw samples and it
> doesn't work correctly (as expected). For example, perf record fails with:
>
> Can't parse sample, err = -14
> 0x4688 [0x8]: failed to process type: 68 [Bad address]
>
> Is this expected? Is the developer of the perf driver responsible to
> make sure that each perf record does not exceed 64KB in size? If that's
> the case, I am wondering why the raw sample has a u32 for its size.

For the large records, you may consider an auxtrace interface.

Thanks
Namhyung

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <29be54b5-5872-33ac-7c8e-998d77226a0a@amazon.com>
2020-10-27  5:08 ` Perf raw sample overflows perf record Namhyung Kim

Linux-perf-users Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-perf-users/0 linux-perf-users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-perf-users linux-perf-users/ https://lore.kernel.org/linux-perf-users \
		linux-perf-users@vger.kernel.org
	public-inbox-index linux-perf-users

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-perf-users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git