[igt-dev] [PATCH i-g-t 2/3] lib: Add more debugfs and ftrace helpers

Ashutosh Dixit ashutosh.dixit at intel.com
Thu Apr 11 04:41:33 UTC 2019


On Tue, 09 Apr 2019 01:21:03 -0700, Chris Wilson wrote:
>
> Quoting Ashutosh Dixit (2019-04-02 03:44:20)
> > +/* Implement 'echo 0/1 > <debugfs>/tracing/str[i]' */
> > +int igt_ftrace_set_events(const char **str, int nstr, bool enable)
> > +{
> > +       int i, ret, err = 0;
> > +
> > +       if (igt_ftrace.dir < 0)
> > +               return -ENODEV;
> > +
> > +       for (i = 0; i < nstr; i++) {
> > +               ret = igt_sysfs_set(igt_ftrace.dir, str[i],
> > +                                   enable ? "1\n" : "0\n");
> > +               if (ret)
> > +                       err = ret;
> > +       }
>
> Why didn't you extend the set of options passed to enable?

Hi Chris, which particular options are you referring to? (This function is
enabling ftrace events according to the method in Section 2.2,
Documentation/trace/events.rst. Please see Patch 3/3 for how this function
is used). Some options are enabled in __igt_ftrace_enable() in Patch 1/3
(your patch).

> Do we want to be adjusting these as the test runs, or should it be setup
> once for the test?

Again please see Patch 3/3, the options are set up in igt_fixture once for
the test. Thanks.
--
Ashutosh


More information about the igt-dev mailing list