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

Chris Wilson chris at chris-wilson.co.uk
Tue Apr 9 08:21:03 UTC 2019


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? Do we want to
be adjusting these as the test runs, or should it be setup once for the
test?
-Chris


More information about the igt-dev mailing list