Re: [PATCH 1/5] perf trace: add support for pagefault tracing

From: Stanislav Fomichev
Date: Thu Jun 19 2014 - 08:07:04 EST


> So make it default to the most common case :-)
Ok, agreed, will make --pf=all|maj|min and will default it to maj.

> That is my expectation, yes, if I ask for the map where address N is, it
> should return just that, where have you found this bug?
>
> The thread__find_addr_map will end up calling maps__find() and it does
> this:
>
> if (ip < m->start)
> p = &(*p)->rb_left;
> else if (ip > m->end)
> p = &(*p)->rb_right;
> else
> return m;
>
> Where is the problem?
You're right, we don't need to check the range, if map is non-null it's a
valid one. I'll remove valid_dso and will just check al.map for null.

> Understood the intent, but the test here is really:
>
> if (evsel->attr.type == PERF_TYPE_TRACEPOINT &&
> sample.raw_data == NULL)
>
> Ok?
Yes, makes more sense.

> Also, have you considered using:
>
> [root@zoo ~]# perf list exceptions:page_fault*
> exceptions:page_fault_user [Tracepoint event]
> exceptions:page_fault_kernel [Tracepoint event]
> [root@zoo ~]#
>
> Instead? I need to check if they're completely equivalent to what we
> need here...
Hm, didn't know there are two kinds of fault events :-/
But it seems these are x86 only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/