linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Kristina Martsenko <kristina.martsenko@arm.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Will Deacon <will.deacon@arm.com>
Subject: [PATCH 04/16] tools beauty: Make the prctl option table generator catch all PR_ options
Date: Fri,  4 Jan 2019 15:33:25 -0300	[thread overview]
Message-ID: <20190104183337.12771-5-acme@kernel.org> (raw)
In-Reply-To: <20190104183337.12771-1-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

In ba8308856564 ("arm64: add prctl control for resetting ptrauth keys")
the PR_PAC_RESET_KEYS prctl option was introduced, get that into the
regex in addition to PR_GET_* and PR_SET_*:

So just get everything that matches '^#define PR_\w+' this ends up
adding these entries:

  $ tools/perf/trace/beauty/prctl_option.sh  > after
  $ diff -u before after
  --- before	2019-01-03 14:58:51.541807353 -0300
  +++ after	2019-01-03 15:17:05.909583804 -0300
  @@ -19,12 +19,18 @@
          [20] = "SET_ENDIAN",
          [21] = "GET_SECCOMP",
          [22] = "SET_SECCOMP",
  +       [23] = "CAPBSET_READ",
  +       [24] = "CAPBSET_DROP",
          [25] = "GET_TSC",
          [26] = "SET_TSC",
          [27] = "GET_SECUREBITS",
          [28] = "SET_SECUREBITS",
          [29] = "SET_TIMERSLACK",
          [30] = "GET_TIMERSLACK",
  +       [31] = "TASK_PERF_EVENTS_DISABLE",
  +       [32] = "TASK_PERF_EVENTS_ENABLE",
  +       [33] = "MCE_KILL",
  +       [34] = "MCE_KILL_GET",
          [35] = "SET_MM",
          [36] = "SET_CHILD_SUBREAPER",
          [37] = "GET_CHILD_SUBREAPER",
  @@ -33,8 +39,13 @@
          [40] = "GET_TID_ADDRESS",
          [41] = "SET_THP_DISABLE",
          [42] = "GET_THP_DISABLE",
  +       [43] = "MPX_ENABLE_MANAGEMENT",
  +       [44] = "MPX_DISABLE_MANAGEMENT",
          [45] = "SET_FP_MODE",
          [46] = "GET_FP_MODE",
  +       [47] = "CAP_AMBIENT",
  +       [50] = "SVE_SET_VL",
  +       [51] = "SVE_GET_VL",
          [52] = "GET_SPECULATION_CTRL",
          [53] = "SET_SPECULATION_CTRL",
          [54] = "PAC_RESET_KEYS",
  $

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kristina Martsenko <kristina.martsenko@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Will Deacon <will.deacon@arm.com>
Link: https://lkml.kernel.org/n/tip-sg2pkmtjr5988bhbcp4yp6sw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/trace/beauty/prctl_option.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/trace/beauty/prctl_option.sh b/tools/perf/trace/beauty/prctl_option.sh
index d32f8f1124af..3109d7b05e11 100755
--- a/tools/perf/trace/beauty/prctl_option.sh
+++ b/tools/perf/trace/beauty/prctl_option.sh
@@ -4,7 +4,7 @@
 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/
 
 printf "static const char *prctl_options[] = {\n"
-regex='^#define[[:space:]]+PR_([GS]ET\w+)[[:space:]]*([[:xdigit:]]+).*'
+regex='^#define[[:space:]]+PR_(\w+)[[:space:]]*([[:xdigit:]]+).*'
 egrep $regex ${header_dir}/prctl.h | grep -v PR_SET_PTRACER | \
 	sed -r "s/$regex/\2 \1/g"	| \
 	sort -n | xargs printf "\t[%s] = \"%s\",\n"
-- 
2.20.1


  parent reply	other threads:[~2019-01-04 18:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04 18:33 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 01/16] perf stat: Fix endless wait for child process Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 02/16] tools headers x86: Sync disabled-features.h Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 03/16] tools headers uapi: Sync prctl.h with the kernel sources Arnaldo Carvalho de Melo
2019-01-04 18:33 ` Arnaldo Carvalho de Melo [this message]
2019-01-04 18:33 ` [PATCH 05/16] tools thermal tmon: Use -O3 instead of -O1 if available Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 06/16] tools iio: Override CFLAGS assignments Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 07/16] tools headers uapi: Update i915_drm.h Arnaldo Carvalho de Melo
2019-01-07 10:53   ` Joonas Lahtinen
2019-01-04 18:33 ` [PATCH 08/16] tools headers uapi: Sync linux/in.h copy from the kernel sources Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 09/16] tools headers uapi: Sync linux/kvm.h with " Arnaldo Carvalho de Melo
2019-01-05 16:04   ` Paolo Bonzini
2019-01-04 18:33 ` [PATCH 10/16] tools headers uapi: Sync copy of asm-generic/unistd.h " Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 11/16] tools headers x86: Sync asm/cpufeatures.h copy " Arnaldo Carvalho de Melo
2019-01-05 16:06   ` Paolo Bonzini
2019-01-04 18:33 ` [PATCH 12/16] perf report: Fix wrong iteration count in --branch-history Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 13/16] perf annotate: Pass filename to objdump via execl Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 14/16] perf strbuf: Remove redundant va_end() in strbuf_addv() Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 15/16] perf python: Make sure the python binding output directory is in place Arnaldo Carvalho de Melo
2019-01-04 18:33 ` [PATCH 16/16] perf test shell: Use a fallback to get the pathname in vfs_getname Arnaldo Carvalho de Melo
2019-01-08 15:32 ` [GIT PULL 00/16] perf/core improvements and fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190104183337.12771-5-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=jolsa@kernel.org \
    --cc=kristina.martsenko@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=will.deacon@arm.com \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).