Re: [PATCH 09/18] tracing: Add indexing of arguments for function based events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Thu, 8 Feb 2018 19:59:24 +0900
Namhyung Kim <namhyung@xxxxxxxxxx> wrote:

> > @@ -347,6 +361,8 @@ static long long get_arg(struct func_arg *arg, unsigned long val)
> >  	char buf[8];
> >  	int ret;
> >  
> > +	val += arg->index;
> > +
> >  	if (!arg->indirect)
> >  		return val;  
> So this also works without the indirect, and just add the immediate to
> the value.

Not sure what you are asking here. The immediate adds to the current
value, where as the indirect will then look what's at that location.

If the arg (val) is 0xffffffffabcd0000

	u64 val+8

Will return: 0xffffffffabcd0008

	u64 val[1]

will return what's at location 0xffffffffabcd0008

"u64 val+8[0]" is the same as "u64 val[1]"

Note: "u64 val[0]+8" will return what's at location 0xffffffffabcd0000
plus 8.

-- Steve
To unsubscribe from this list: send the line "unsubscribe linux-trace-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux