lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 13 Mar 2019 23:07:54 +0900
From:   Namhyung Kim <namhyung@...nel.org>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Stephane Eranian <eranian@...gle.com>,
        Alexey Budankov <alexey.budankov@...ux.intel.com>
Subject: Re: [PATCH 3/5] perf record: Add --dir option to store data in directory

Hi Jirka,

On Mon, Mar 11, 2019 at 12:30 AM Jiri Olsa <jolsa@...nel.org> wrote:
>
> Adding --dir option to store data in directory. It's next
> step for multiple threads in record. It's now possible to
> make directory data via --dir option, like:
>
>   $ perf record --dir perf bench sched messaging
>   $ ls -l perf.data
>   total 344
>   -rw-------. 1 jolsa jolsa 43864 Jan 20 22:26 data.0
>   -rw-------. 1 jolsa jolsa 30464 Jan 20 22:26 data.1
>   -rw-------. 1 jolsa jolsa 53816 Jan 20 22:26 data.2
>   -rw-------. 1 jolsa jolsa 30368 Jan 20 22:26 data.3
>   -rw-------. 1 jolsa jolsa 40088 Jan 20 22:26 data.4
>   -rw-------. 1 jolsa jolsa 42592 Jan 20 22:26 data.5
>   -rw-------. 1 jolsa jolsa 56136 Jan 20 22:26 data.6
>   -rw-------. 1 jolsa jolsa 25992 Jan 20 22:26 data.7
>   -rw-------. 1 jolsa jolsa  8832 Jan 20 22:26 header
>
> There's a data file created for every cpu and it's storing
> data for those cpu maps.
>
> It's possible to transform directory data into standard
> perf.data file via following inject command:
>
>   $ perf inject -o perf.data.file -i perf.data
>
> The --dir option enabled DIR_FORMAT feature to be stored
> in header file to indicate the directory layout.
>
> Don't allow to use --dir with --aio yet. It needs
> to be investigated first.
>
> Link: http://lkml.kernel.org/n/tip-0kjm8wpglzu2tm18tpagfm4d@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@...nel.org>
> ---

[SNIP]
> @@ -1983,6 +2040,8 @@ static struct option __record_options[] = {
>         OPT_CALLBACK(0, "affinity", &record.opts, "node|cpu",
>                      "Set affinity mask of trace reading thread to NUMA node cpu mask or cpu of processed mmap buffer",
>                      record__parse_affinity),
> +       OPT_BOOLEAN(0, "dir", &record.data.is_dir,
> +                   "Store data into directory perf.data"),
>         OPT_END()
>  };
>
> @@ -2134,6 +2193,17 @@ int cmd_record(int argc, const char **argv)
>                 goto out;
>         }
>
> +       if (perf_data__is_dir(&rec->data)) {
> +               if (!rec->opts.sample_time) {
> +                       pr_err("Sample timestamp is required for indexing\n");

s/indexing/directory output/ ?

Thanks
Namhyung


> +                       goto out;
> +               }
> +               if (record__aio_enabled(rec)) {
> +                       pr_err("Cannot use both --dir and --aio yet.\n");
> +                       goto out;
> +               }
> +       }
> +
>         if (rec->opts.target.tid && !rec->opts.no_inherit_set)
>                 rec->opts.no_inherit = true;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ