]> www.infradead.org Git - users/dwmw2/linux.git/commit
tools api: Add a lightweight buffered reading api
authorIan Rogers <irogers@google.com>
Wed, 15 Apr 2020 05:40:49 +0000 (22:40 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 30 Apr 2020 13:48:28 +0000 (10:48 -0300)
commite95770af4c4a280fab2080529d30452a7628d45d
tree6abebd1ff578789b6d7e2d37fbfee32b42ae2fd4
parent13edc237200c75425ab0e3fe4b4c75dafb468c2e
tools api: Add a lightweight buffered reading api

The synthesize benchmark shows the majority of execution time going to
fgets and sscanf, necessary to parse /proc/pid/maps. Add a new buffered
reading library that will be used to replace these calls in a follow-up
CL. Add tests for the library to perf test.

Committer tests:

  $ perf test api
  63: Test api io                                           : Ok
  $

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andrey Zhizhikin <andrey.z@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lore.kernel.org/lkml/20200415054050.31645-3-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/api/io.h [new file with mode: 0644]
tools/perf/tests/Build
tools/perf/tests/api-io.c [new file with mode: 0644]
tools/perf/tests/builtin-test.c
tools/perf/tests/tests.h