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

Commit 767cd50a authored by Satyajit Desai's avatar Satyajit Desai
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 cc8c86a2
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -123,13 +123,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);