DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [RFC PATCH 3/3] build: write messages to dpdk build log file
Date: Thu, 22 Oct 2020 15:59:44 +0100	[thread overview]
Message-ID: <20201022145944.470054-4-bruce.richardson@intel.com> (raw)
In-Reply-To: <20201022145944.470054-1-bruce.richardson@intel.com>

Add additional info into the DPDK-specific logs by copying or replacing all
"message()" calls with writes to the log file, making the build
configuration, including lists of enabled/disabled drivers etc. available
after the meson run has completed.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/meson.build   | 2 +-
 config/arm/meson.build | 2 ++
 config/x86/meson.build | 2 ++
 drivers/meson.build    | 6 ++++--
 examples/meson.build   | 1 +
 lib/meson.build        | 5 +++--
 meson.build            | 6 ++++++
 7 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index 8bfb02890..b2d90cfd8 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -439,7 +439,7 @@ dpdk_test = executable('dpdk-test',
 	install: true)
 
 has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
-message('hugepage availability: @0@'.format(has_hugepage))
+run_command(log, 'hugepage availability: @0@'.format(has_hugepage))
 
 # some perf tests (eg: memcpy perf autotest)take very long
 # to complete, so timeout to 10 minutes
diff --git a/config/arm/meson.build b/config/arm/meson.build
index b49203fa8..31ac79480 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -182,6 +182,7 @@ else
 	endforeach
 
 	message('Implementer : ' + machine[0])
+	run_command(log, 'config/arm/meson.build: Implementer = ' + machine[0])
 	foreach flag: machine[1]
 		if flag.length() > 0
 			dpdk_conf.set(flag[0], flag[1])
@@ -205,6 +206,7 @@ else
 	endforeach
 endif
 message(machine_args)
+run_command(log, 'config/arm/meson.build: machine_args = ', machine_args)
 
 if (cc.get_define('__ARM_NEON', args: machine_args) != '' or
     cc.get_define('__aarch64__', args: machine_args) != '')
diff --git a/config/x86/meson.build b/config/x86/meson.build
index 31bfa63b1..0008717b8 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -13,6 +13,8 @@ endif
 # we require SSE4.2 for DPDK
 if cc.get_define('__SSE4_2__', args: machine_args) == ''
 	message('SSE 4.2 not enabled by default, explicitly enabling')
+	run_command(log, 'config/x86/meson.build:',
+			'SSE 4.2 not enabled by default, explicitly enabling')
 	machine_args += '-msse4'
 endif
 
diff --git a/drivers/meson.build b/drivers/meson.build
index c008abd4a..fd925114e 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -90,8 +90,10 @@ foreach subpath:subdirs
 				if not is_variable('shared_rte_' + d)
 					build = false
 					reason = 'Missing internal dependency, "@0@"'.format(d)
-					message('Disabling @1@ [@2@]: missing internal dependency "@0@"'
-							.format(d, name, 'drivers/' + drv_path))
+					log_msg = 'Disabling @1@ [@2@]: missing internal dependency "@0@"'.format(
+						d, name, 'drivers/' + drv_path)
+					message(log_msg)
+					run_command(log, log_msg)
 				else
 					shared_deps += [get_variable('shared_rte_' + d)]
 					static_deps += [get_variable('static_rte_' + d)]
diff --git a/examples/meson.build b/examples/meson.build
index 414ec55cc..8f9922cad 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -105,5 +105,6 @@ foreach example: examples
 		error('Cannot build requested example "' + name + '"')
 	else
 		message('Skipping example "' + name + '"')
+		run_command(log, 'Skipping example "' + name + '"')
 	endif
 endforeach
diff --git a/lib/meson.build b/lib/meson.build
index 2715c0f66..aac07eb50 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -112,8 +112,9 @@ foreach l:libraries
 			static_dep = shared_dep
 		else
 			if is_windows and use_function_versioning
-				message('@0@: Function versioning is not supported by Windows.'
-				.format(name))
+				log_msg = '@0@: Function versioning is not supported by Windows.'.format(name)
+				message(log_msg)
+				run_command(log, log_msg)
 			endif
 
 			if use_function_versioning
diff --git a/meson.build b/meson.build
index 8333d264f..a587579f3 100644
--- a/meson.build
+++ b/meson.build
@@ -15,6 +15,8 @@ project('DPDK', 'C',
 subdir('buildtools')
 
 run_command(log, '======= Starting meson =======')
+run_command(log, 'Meson version', meson.version())
+run_command(log, 'DPDK version', meson.project_version())
 
 # set up some global vars for compiler, platform, configuration, etc.
 cc = meson.get_compiler('c')
@@ -76,6 +78,7 @@ foreach lib:enabled_libs
 	endif
 endforeach
 message(output_message + '\n')
+run_command(log, output_message)
 
 output_message = '\n===============\nDrivers Enabled\n===============\n'
 foreach class:dpdk_driver_classes
@@ -92,6 +95,7 @@ foreach class:dpdk_driver_classes
 	endforeach
 endforeach
 message(output_message + '\n')
+run_command(log, output_message)
 
 output_message = '\n=================\nContent Skipped\n=================\n'
 output_message += '\nlibs:\n\t'
@@ -105,3 +109,5 @@ foreach drv:dpdk_drvs_disabled
 	output_message += drv + ':\t' + reason + '\n\t'
 endforeach
 message(output_message + '\n')
+run_command(log, output_message)
+run_command(log, 'Meson done\n')
-- 
2.25.1


  parent reply	other threads:[~2020-10-22 15:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22 14:59 [dpdk-dev] [RFC PATCH 0/3] add custom logging to DPDK meson runs Bruce Richardson
2020-10-22 14:59 ` [dpdk-dev] [RFC PATCH 1/3] build: add a dpdk-specific meson log file Bruce Richardson
2020-10-22 14:59 ` [dpdk-dev] [RFC PATCH 2/3] build: shorten top-level build file Bruce Richardson
2020-10-22 14:59 ` Bruce Richardson [this message]
2021-09-15 16:23 ` [dpdk-dev] [RFC PATCH 0/3] add custom logging to DPDK meson runs Bruce Richardson
2021-09-17 13:36   ` Bruce Richardson

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=20201022145944.470054-4-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /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).