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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-1vk0g5twas2ioswn1mmvnvwq@git.kernel.org>
Date:   Fri, 2 Dec 2016 02:35:00 -0800
From:   tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     tglx@...utronix.de, hpa@...or.com, namhyung@...nel.org,
        dsahern@...il.com, jolsa@...nel.org, adrian.hunter@...el.com,
        wangnan0@...wei.com, acme@...hat.com, linux-kernel@...r.kernel.org,
        mingo@...nel.org
Subject: [tip:perf/core] perf ui helpline: Provide a printf variant

Commit-ID:  9484b86e9cad903d3295d75c03961c3bdd1444a8
Gitweb:     http://git.kernel.org/tip/9484b86e9cad903d3295d75c03961c3bdd1444a8
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Fri, 25 Nov 2016 15:48:25 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 25 Nov 2016 15:49:16 -0300

perf ui helpline: Provide a printf variant

To print some values, like in the annotation code with invalid jump
offsets.

Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-1vk0g5twas2ioswn1mmvnvwq@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/ui/helpline.c | 10 ++++++++++
 tools/perf/ui/helpline.h |  1 +
 2 files changed, 11 insertions(+)

diff --git a/tools/perf/ui/helpline.c b/tools/perf/ui/helpline.c
index 5b74a7e..379039a 100644
--- a/tools/perf/ui/helpline.c
+++ b/tools/perf/ui/helpline.c
@@ -72,3 +72,13 @@ int ui_helpline__vshow(const char *fmt, va_list ap)
 {
 	return helpline_fns->show(fmt, ap);
 }
+
+void ui_helpline__printf(const char *fmt, ...)
+{
+	va_list ap;
+
+	ui_helpline__pop();
+	va_start(ap, fmt);
+	ui_helpline__vpush(fmt, ap);
+	va_end(ap);
+}
diff --git a/tools/perf/ui/helpline.h b/tools/perf/ui/helpline.h
index 46181f4..d52d0a1 100644
--- a/tools/perf/ui/helpline.h
+++ b/tools/perf/ui/helpline.h
@@ -21,6 +21,7 @@ void ui_helpline__push(const char *msg);
 void ui_helpline__vpush(const char *fmt, va_list ap);
 void ui_helpline__fpush(const char *fmt, ...);
 void ui_helpline__puts(const char *msg);
+void ui_helpline__printf(const char *fmt, ...);
 int  ui_helpline__vshow(const char *fmt, va_list ap);
 
 extern char ui_helpline__current[512];

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ