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
| ||
|
Date: Tue, 24 Jun 2014 22:50:49 -0700 From: tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com> To: linux-tip-commits@...r.kernel.org Cc: linux-kernel@...r.kernel.org, eranian@...gle.com, paulus@...ba.org, acme@...hat.com, hpa@...or.com, mingo@...nel.org, peterz@...radead.org, efault@....de, namhyung@...nel.org, jolsa@...hat.com, fweisbec@...il.com, adrian.hunter@...el.com, dsahern@...il.com, tglx@...utronix.de, dzickus@...hat.com Subject: [tip:perf/core] perf trace: Cache the is_exit syscall test Commit-ID: 5089f20ee7104bd219cafefa62d83f53e75cc44c Gitweb: http://git.kernel.org/tip/5089f20ee7104bd219cafefa62d83f53e75cc44c Author: Arnaldo Carvalho de Melo <acme@...hat.com> AuthorDate: Tue, 17 Jun 2014 14:29:24 -0300 Committer: Arnaldo Carvalho de Melo <acme@...hat.com> CommitDate: Thu, 19 Jun 2014 16:13:13 -0300 perf trace: Cache the is_exit syscall test No need to use two strcmp calls per syscall entry, do it just once, when reading the per syscall info. Cc: Adrian Hunter <adrian.hunter@...el.com> Cc: David Ahern <dsahern@...il.com> Cc: Don Zickus <dzickus@...hat.com> Cc: Frederic Weisbecker <fweisbec@...il.com> Cc: Jiri Olsa <jolsa@...hat.com> Cc: Mike Galbraith <efault@....de> Cc: Namhyung Kim <namhyung@...nel.org> Cc: Paul Mackerras <paulus@...ba.org> Cc: Peter Zijlstra <peterz@...radead.org> Cc: Stephane Eranian <eranian@...gle.com> Link: http://lkml.kernel.org/n/tip-lymtxhz0mg3adyt5e2pssn8f@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com> --- tools/perf/builtin-trace.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 28c86e2..5549cee 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -1108,6 +1108,7 @@ struct syscall { struct event_format *tp_format; const char *name; bool filtered; + bool is_exit; struct syscall_fmt *fmt; size_t (**arg_scnprintf)(char *bf, size_t size, struct syscall_arg *arg); void **arg_parm; @@ -1473,6 +1474,8 @@ static int trace__read_syscall_info(struct trace *trace, int id) if (sc->tp_format == NULL) return -1; + sc->is_exit = !strcmp(name, "exit_group") || !strcmp(name, "exit"); + return syscall__set_arg_fmts(sc); } @@ -1643,7 +1646,7 @@ static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel, printed += syscall__scnprintf_args(sc, msg + printed, 1024 - printed, args, trace, thread); - if (!strcmp(sc->name, "exit_group") || !strcmp(sc->name, "exit")) { + if (sc->is_exit) { if (!trace->duration_filter && !trace->summary_only) { trace__fprintf_entry_head(trace, thread, 1, sample->time, trace->output); fprintf(trace->output, "%-70s\n", ttrace->entry_str); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists