linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Issue with trace-cmd 3 and kernelshark
@ 2022-03-12  3:18 Steven Rostedt
  2022-03-12  4:50 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2022-03-12  3:18 UTC (permalink / raw)
  To: Linux Trace Devel, Yordan Karadzhov, Tzvetomir Stoyanov

I just tried the following with trace-cmd 3 on both the host and guest:

 guest> trace-cmd agent

 host> trace-cmd record -e kvm -A guest -e all ssh guest

[ logged in, did an 'ls' then logged out ]

I ended up with a trace.dat and trace-guest.dat

But when I did:

 kernelshark trace.dat -a trace-guest.dat

I ended up with a segfault here (in trace-input.c)

static struct page *allocate_page(struct tracecmd_input *handle,
				  int cpu, off64_t offset)
{
	struct cpu_data *cpu_data = &handle->cpu_data[cpu];
	struct page **pages;
	struct page *page;
	int index;

	index = (offset - cpu_data->file_offset) / handle->page_size;
	if (index >= cpu_data->nr_pages) {
		pages = realloc(cpu_data->pages, (index + 1) * sizeof(*cpu_data->pages));
		if (!pages)
			return NULL;
		memset(pages + cpu_data->nr_pages, 0,
		       (index + 1 - cpu_data->nr_pages) * sizeof(*cpu_data->pages));
		cpu_data->pages = pages;
		cpu_data->nr_pages = index + 1;
	}
	if (cpu_data->pages[index]) {
		cpu_data->pages[index]->ref_count++;  <<---- seg fault here!
		return cpu_data->pages[index];
	}

	page = malloc(sizeof(*page));
	if (!page)
		return NULL;


It appears that it doesn't like the fact that the file is compressed. This
was my worry about compressing date :-/

-- Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-12  5:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-12  3:18 Issue with trace-cmd 3 and kernelshark Steven Rostedt
2022-03-12  4:50 ` Steven Rostedt
2022-03-12  5:06   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).