Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93a5e24b authored by Satyajit Desai's avatar Satyajit Desai Committed by Rama Aparna Mallavarapu
Browse files

coresight-ost: Add TGID information for FTRACE events



Add TGID information in the header field of OST packets.
TGID is to be used for post processing to obtain an
accurate picture of the system.

Signed-off-by: default avatarSatyajit Desai <sadesai@codeaurora.org>
Change-Id: Ic7ac22146911689c0e2d16df6d859da8d45e31c8
parent dc8ec7ba
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -124,13 +124,14 @@ static int stm_trace_ost_header(void __iomem *ch_addr, uint32_t flags,

static int stm_trace_data_header(void __iomem *addr)
{
	char hdr[16];
	char hdr[24];
	int len = 0;

	*(uint16_t *)(hdr) = STM_MAKE_VERSION(0, 1);
	*(uint16_t *)(hdr) = STM_MAKE_VERSION(0, 2);
	*(uint16_t *)(hdr + 2) = STM_HEADER_MAGIC;
	*(uint32_t *)(hdr + 4) = raw_smp_processor_id();
	*(uint64_t *)(hdr + 8) = sched_clock();
	*(uint64_t *)(hdr + 16) = task_tgid_nr(get_current());

	len += stm_ost_send(addr, hdr, sizeof(hdr));
	len += stm_ost_send(addr, current->comm, TASK_COMM_LEN);