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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1448053053-24188-11-git-send-email-jbacik@fb.com>
Date:	Fri, 20 Nov 2015 15:57:32 -0500
From:	Josef Bacik <jbacik@...com>
To:	<kernel-team@...com>, <linux-kernel@...r.kernel.org>,
	<rostedt@...dmis.org>
Subject: [PATCH 10/11] trace-cmd: add a helper function for stream polling

Since the pids stuff is local to trace-record, add a helper function that will
poll the stream fd's for new data so that external apps can poll it.

Signed-off-by: Josef Bacik <jbacik@...com>
---
 trace-cmd.h    | 1 +
 trace-record.c | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/trace-cmd.h b/trace-cmd.h
index d2e4f11..08cb774 100644
--- a/trace-cmd.h
+++ b/trace-cmd.h
@@ -293,6 +293,7 @@ void tracecmd_enable_tracing(void);
 void tracecmd_start_threads(enum tracecmd_trace_type type,
 			    tracecmd_handle_init_func handle_init, int global);
 void tracecmd_stop_threads(enum tracecmd_trace_type type);
+int tracecmd_stream_loop(struct timeval *tv);
 
 /* --- Plugin handling --- */
 extern struct pevent_plugin_option trace_ftrace_options[];
diff --git a/trace-record.c b/trace-record.c
index 337445d..3c8eb58 100644
--- a/trace-record.c
+++ b/trace-record.c
@@ -2563,6 +2563,11 @@ static void finish_network(void)
 	free(host);
 }
 
+int tracecmd_stream_loop(struct timeval *tv)
+{
+	return trace_stream_read(pids, recorder_threads, tv);
+}
+
 void tracecmd_start_threads(enum tracecmd_trace_type type,
 			    tracecmd_handle_init_func handle_init, int global)
 {
-- 
2.1.0

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ