[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPhKKr_28VwzsxBcQeXqABVtWEvw4mZ3j3gFDCOHicr=0YfBdQ@mail.gmail.com>
Date: Wed, 31 Oct 2012 18:15:39 -0400
From: Dhaval Giani <dhaval.giani@...il.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Arnaldo de Melo <acme@...radead.org>, mingo@...nel.org,
Peter Zijlstra <peterz@...radead.org>,
akshay kumar <iit.akshay@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [BUG] perf report: different reports when run on terminal as
opposed to script
On Wed, Oct 31, 2012 at 3:12 AM, Namhyung Kim <namhyung@...nel.org> wrote:
> On Tue, 30 Oct 2012 08:05:45 -0400, Dhaval Giani wrote:
>> On Tue, Oct 30, 2012 at 3:42 AM, Namhyung Kim <namhyung@...nel.org> wrote:
>>> Hi Dhaval,
>>>
>>> On Mon, 29 Oct 2012 12:45:53 -0400, Dhaval Giani wrote:
>>>> On Mon, Oct 29, 2012 at 12:01 PM, Dhaval Giani <dhaval.giani@...il.com> wrote:
>>>>> Hi,
>>>>>
>>>>> As part of a class assignment I have to collect some performance
>>>>> statistics. In order to do so I run
>>>>>
>>>>> perf record -g <the program I have to profile>
>>>>>
>>>>> And in another window, I start 200 threads of the load generator
>>>>> (which is not recorded by perf)
>>>>>
>>>>> This generates me statistics that I expect to see, and I am happy. As
>>>>> this is academia and a class assignment, I need to collect information
>>>>> and analyze it across different setups. Which of course meant I script
>>>>> this whole thing, which basically is
>>>>>
>>>>> for i in all possibilities
>>>>> do
>>>>> perf record -g <the program I have to profile> &
>>>>> WAITPID=$!
>>>>> for j in NR_THREADS
>>>>> do
>>>>> <start load generator> &
>>>>> KILLPID=$!
>>>>> done
>>>>> wait $PID
>>>
>>> You meant $WAITPID, right?
>>>
>>
>> yes. grrr. I changed the name here to WAITPID for it to be clear and
>> that was a fail. (I blame the cold)
>>
>>>
>>>>> kill $KILLPID
>>>
>>> Doesn't it kill the last load generator only?
>>>
>>>
>>
>> Well, this was a bug in me typing the pseudo code. the actual script
>> does "$KILLPID $!"
>
> Okay, so I suspect that it might be affected by the autogroup scheduling
> feature since you said running load generators in another window - I
> guess it's a terminal. How about running them with setsid?
>
Why would that affect the data collection for the program being
profiled? The time spent (since it is a compute intensive program) in
various functions shouldn't change, correct? (Unless I am missing
something).
/me goes and tries it out
Hmm. OK, so that doesn't help. Still the same.
Thanks!
Dhaval
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists