On Mon, Mar 31, 2014 at 10:55:35PM -0400, Don Zickus wrote:
> On Sat, Mar 29, 2014 at 06:11:38PM +0100, Jiri Olsa wrote:
> > On Mon, Mar 24, 2014 at 03:36:57PM -0400, Don Zickus wrote:
> > > Modified the code to allow latency settings to be tweaked on the command line
> > > and also the ability to dynamically profile stores (or disable using stores).
> > >
> > > This allows the tool to be used on older Intel platforms like Westmere.
> > >
> > > Signed-off-by: Don Zickus <[email protected]>
> > > ---
> >
> > SNIP
> >
> > > @@ -316,6 +369,12 @@ int cmd_c2c(int argc, const char **argv, const char *prefix __maybe_unused)
> > > };
> > > const struct option c2c_options[] = {
> > > OPT_BOOLEAN('r', "raw_records", &c2c.raw_records, "dump raw events"),
> > > + OPT_INTEGER('l', "latency-level", &lat_level,
> > > + "specify the latency threshold for loads [default=30]"),
> > > + OPT_INTEGER('p', "precision-level", &prec_level,
> > > + "specify the precision level of events (0,1,2,3) [default=1]"),
> >
> > could we get also option for user space modifier?
>
> You mean the 'u' modifier, ie cpu/mem-loads/u ? If so, then I can do that
> but will that work with the -a option (which is hardcoded in the c2c
> tool [system-wide mode])?
right, forgot about that.. could the -a option be optional as well?
probably the same way as for record would be the best:
perf c2c record ./foo # workload specific
perf c2c record -a sleep 3 # system wide
jirka
On Sun, Apr 06, 2014 at 03:14:22PM +0200, Jiri Olsa wrote:
> On Mon, Mar 31, 2014 at 10:55:35PM -0400, Don Zickus wrote:
> > On Sat, Mar 29, 2014 at 06:11:38PM +0100, Jiri Olsa wrote:
> > > On Mon, Mar 24, 2014 at 03:36:57PM -0400, Don Zickus wrote:
> > > > Modified the code to allow latency settings to be tweaked on the command line
> > > > and also the ability to dynamically profile stores (or disable using stores).
> > > >
> > > > This allows the tool to be used on older Intel platforms like Westmere.
> > > >
> > > > Signed-off-by: Don Zickus <[email protected]>
> > > > ---
> > >
> > > SNIP
> > >
> > > > @@ -316,6 +369,12 @@ int cmd_c2c(int argc, const char **argv, const char *prefix __maybe_unused)
> > > > };
> > > > const struct option c2c_options[] = {
> > > > OPT_BOOLEAN('r', "raw_records", &c2c.raw_records, "dump raw events"),
> > > > + OPT_INTEGER('l', "latency-level", &lat_level,
> > > > + "specify the latency threshold for loads [default=30]"),
> > > > + OPT_INTEGER('p', "precision-level", &prec_level,
> > > > + "specify the precision level of events (0,1,2,3) [default=1]"),
> > >
> > > could we get also option for user space modifier?
> >
> > You mean the 'u' modifier, ie cpu/mem-loads/u ? If so, then I can do that
> > but will that work with the -a option (which is hardcoded in the c2c
> > tool [system-wide mode])?
>
> right, forgot about that.. could the -a option be optional as well?
> probably the same way as for record would be the best:
>
> perf c2c record ./foo # workload specific
> perf c2c record -a sleep 3 # system wide
I understand what you are saying, but our tool was written to find cache
contention across the system, so -a is usually implied. Most of our
profiling is done system-wide. I would rather implement the opposite
option --no-system-wide, if that is ok.
Cheers,
Don
Hi Jiri,
On Sun, 6 Apr 2014 15:14:22 +0200, Jiri Olsa wrote:
> On Mon, Mar 31, 2014 at 10:55:35PM -0400, Don Zickus wrote:
>> On Sat, Mar 29, 2014 at 06:11:38PM +0100, Jiri Olsa wrote:
>> > On Mon, Mar 24, 2014 at 03:36:57PM -0400, Don Zickus wrote:
>> > > Modified the code to allow latency settings to be tweaked on the command line
>> > > and also the ability to dynamically profile stores (or disable using stores).
>> > >
>> > > This allows the tool to be used on older Intel platforms like Westmere.
>> > >
>> > > Signed-off-by: Don Zickus <[email protected]>
>> > > ---
>> >
>> > SNIP
>> >
>> > > @@ -316,6 +369,12 @@ int cmd_c2c(int argc, const char **argv, const char *prefix __maybe_unused)
>> > > };
>> > > const struct option c2c_options[] = {
>> > > OPT_BOOLEAN('r', "raw_records", &c2c.raw_records, "dump raw events"),
>> > > + OPT_INTEGER('l', "latency-level", &lat_level,
>> > > + "specify the latency threshold for loads [default=30]"),
>> > > + OPT_INTEGER('p', "precision-level", &prec_level,
>> > > + "specify the precision level of events (0,1,2,3) [default=1]"),
>> >
>> > could we get also option for user space modifier?
>>
>> You mean the 'u' modifier, ie cpu/mem-loads/u ? If so, then I can do that
>> but will that work with the -a option (which is hardcoded in the c2c
>> tool [system-wide mode])?
>
> right, forgot about that..
Why? I think the -a option behavior is orthogonal to the user/kernel
modifier behavior, no? Do the mem-loads/stores events have any
restriction on that?
> could the -a option be optional as well?
> probably the same way as for record would be the best:
>
> perf c2c record ./foo # workload specific
> perf c2c record -a sleep 3 # system wide
Agreed.
Thanks,
Namhyung
On Mon, 7 Apr 2014 14:16:18 -0400, Don Zickus wrote:
> On Sun, Apr 06, 2014 at 03:14:22PM +0200, Jiri Olsa wrote:
>> On Mon, Mar 31, 2014 at 10:55:35PM -0400, Don Zickus wrote:
>> > On Sat, Mar 29, 2014 at 06:11:38PM +0100, Jiri Olsa wrote:
>> > > > @@ -316,6 +369,12 @@ int cmd_c2c(int argc, const char **argv, const char *prefix __maybe_unused)
>> > > > };
>> > > > const struct option c2c_options[] = {
>> > > > OPT_BOOLEAN('r', "raw_records", &c2c.raw_records, "dump raw events"),
>> > > > + OPT_INTEGER('l', "latency-level", &lat_level,
>> > > > + "specify the latency threshold for loads [default=30]"),
>> > > > + OPT_INTEGER('p', "precision-level", &prec_level,
>> > > > + "specify the precision level of events (0,1,2,3) [default=1]"),
>> > >
>> > > could we get also option for user space modifier?
>> >
>> > You mean the 'u' modifier, ie cpu/mem-loads/u ? If so, then I can do that
>> > but will that work with the -a option (which is hardcoded in the c2c
>> > tool [system-wide mode])?
>>
>> right, forgot about that.. could the -a option be optional as well?
>> probably the same way as for record would be the best:
>>
>> perf c2c record ./foo # workload specific
>> perf c2c record -a sleep 3 # system wide
>
> I understand what you are saying, but our tool was written to find cache
> contention across the system, so -a is usually implied. Most of our
> profiling is done system-wide.
Hmm.. any chance it can be used for non-system-wide analysis? I think
tool should provide a way to do it if it's a valid usecase. And adding
-a option when recording doesn't look too hard. :)
> I would rather implement the opposite option --no-system-wide, if that
> is ok.
Please just add -a/--system-wide (maybe use can make it default if no
argument/workload is given like perf top does) then tool will provide
the --no-* option automatically.
Thanks,
Namhyung