Thread (10 messages) flat view 10 messages, 1 author, 2016-06-15

[PATCHv5 1/9] run_processes_parallel: delimit intermixed task output

From: Stefan Beller <hidden>
Date: 2016-06-15 23:07:19
Subsystem: the rest · Maintainer: Linus Torvalds

This commit serves 2 purposes. First this may help the user who
tries to diagnose intermixed process calls. Second this may be used
in a later patch for testing. As the output of a command should not
change visibly except for going faster, grepping for the trace output
seems like a viable testing strategy.

Signed-off-by: Stefan Beller <redacted>
---
 run-command.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/run-command.c b/run-command.c
index 358429f..b246118 100644
--- a/run-command.c
+++ b/run-command.c
@@ -965,6 +965,9 @@ static struct parallel_processes *pp_init(int n,
 		n = online_cpus();
 
 	pp->max_processes = n;
+
+	trace_printf("run_processes_parallel: preparing to run up to %d tasks", n);
+
 	pp->data = data;
 	if (!get_next_task)
 		die("BUG: you need to specify a get_next_task function");
@@ -994,6 +997,7 @@ static void pp_cleanup(struct parallel_processes *pp)
 {
 	int i;
 
+	trace_printf("run_processes_parallel: done");
 	for (i = 0; i < pp->max_processes; i++) {
 		strbuf_release(&pp->children[i].err);
 		child_process_clear(&pp->children[i].process);
-- 
2.6.1.261.g0d9c4c1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help