On 05/19/2012 10:32 AM, Andi Kleen wrote:
> Maynard Johnson <maynardj@...> writes:
>> The new perf_events-based 'operf' tool (in the perf-events branch) currently has a "--reset" option which will clear out old profile data. If the user does not pass the "--reset" option, then new profile data that operf collects will be appended to existing profile data. I designed the interface this way to mimic the way that opcontrol-based profiling works -- i.e., the user needs to do 'opcontrol --reset' prior to profiling unless they want to append new data to old. My guess is that oprofile users very infrequently want or need to append profile data, so I am proposing that operf's interface be changed as follows:
>> Remove the "--reset" option and add an "--append" option.
>> The resulting behavior would clear out old profile data by default unless the "--append" option is passed.
>> Does anyone have an opinion, yea or nay, on this?
> I think the new semantics are good, but I would default to keeping a
> backup of the old data. So rename it to something else, then create a
> new session.
Yeah, I think that would be good, too. Will post a patch to make it so.