In this case, perf should only check whether the user-specified precise_ip is greater than the maxprecise_ip without changing it into maximum. Here, introduce perf_get_max_precise_ip() to returnthe max precise ip and do not change attr.precise_ip.

But you reminds me that perf_get_max_precise_ip() can be simplied.> also I think the precise level is not generic for all the events,> so you should check it for specific perf_event_attr later, when> the attr is ready, not in modifier parsingYou are right, and I would check it for specific perf_event_attr.

BTW, I have a question. If the user-specified precise_ip is greater than the max precise_ip, I wonderwhether it is better to adjust the user-specified precise_ip to the maximum available.

ThanksMengting Zhang

> thanks,> jirka> --> To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in> the body of a message to majordomo@vger.kernel.org> More majordomo info at http://vger.kernel.org/majordomo-info.html>> .>