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

Commit 8f06c51f authored by Pawel Moll's avatar Pawel Moll
Browse files

bus: arm-ccn: Provide required event arguments



Since 688d4dfc "perf tools: Support
parsing parameterized events" the perf userspace tools understands
"argument=?" syntax in the events file, making sure that required
arguments are provided by the user and not defaulting to 0, causing
confusion.

This patch adds the required arguments lists for CCN events.

Signed-off-by: default avatarPawel Moll <pawel.moll@arm.com>
parent ffa41524
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ Example of perf tool use:
/ # perf list | grep ccn
  ccn/cycles/                                        [Kernel PMU event]
<...>
  ccn/xp_valid_flit/                                 [Kernel PMU event]
  ccn/xp_valid_flit,xp=?,port=?,vc=?,dir=?/          [Kernel PMU event]
<...>

/ # perf stat -a -e ccn/cycles/,ccn/xp_valid_flit,xp=1,port=0,vc=1,dir=1/ \
+17 −0
Original line number Diff line number Diff line
@@ -340,6 +340,23 @@ static ssize_t arm_ccn_pmu_event_show(struct device *dev,
	if (event->mask)
		res += snprintf(buf + res, PAGE_SIZE - res, ",mask=0x%x",
				event->mask);

	/* Arguments required by an event */
	switch (event->type) {
	case CCN_TYPE_CYCLES:
		break;
	case CCN_TYPE_XP:
		res += snprintf(buf + res, PAGE_SIZE - res,
				",xp=?,port=?,vc=?,dir=?");
		if (event->event == CCN_EVENT_WATCHPOINT)
			res += snprintf(buf + res, PAGE_SIZE - res,
					",cmp_l=?,cmp_h=?,mask=?");
		break;
	default:
		res += snprintf(buf + res, PAGE_SIZE - res, ",node=?");
		break;
	}

	res += snprintf(buf + res, PAGE_SIZE - res, "\n");

	return res;