From: Ilya Leoshkevich via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tromey@adacore.com>, Andrew Burgess <aburgess@redhat.com>
Cc: Ulrich Weigand <ulrich.weigand@de.ibm.com>,
Andreas Arnez <arnez@linux.ibm.com>,
gdb-patches@sourceware.org, Pedro Alves <pedro@palves.net>,
Ilya Leoshkevich <iii@linux.ibm.com>
Subject: [PATCH v2 2/7] gdb.perf/: Add binary_link_with_shlibs setting to GenPerfTest
Date: Tue, 31 May 2022 00:11:42 +0200 [thread overview]
Message-ID: <20220530221147.1991835-3-iii@linux.ibm.com> (raw)
In-Reply-To: <20220530221147.1991835-1-iii@linux.ibm.com>
Performance tests that dynamically load generated shared libraries do
not need to link with them. Provide an option to avoid this.
---
gdb/testsuite/lib/gen-perf-test.exp | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/gdb/testsuite/lib/gen-perf-test.exp b/gdb/testsuite/lib/gen-perf-test.exp
index 0a5607c2c9a..07007db0834 100644
--- a/gdb/testsuite/lib/gen-perf-test.exp
+++ b/gdb/testsuite/lib/gen-perf-test.exp
@@ -100,6 +100,9 @@ namespace eval GenPerfTest {
# The number of compunits in each objfile.
set DEFAULT_NR_COMPUNITS 1
+ # Should the binary be linked with the generated shared libraries?
+ set DEFAULT_BINARY_LINK_WITH_SHLIBS true
+
# The number of public globals in each compunit.
set DEFAULT_NR_EXTERN_GLOBALS 1
@@ -254,6 +257,7 @@ namespace eval GenPerfTest {
set testcase(tail_shlib_headers) $GenPerfTest::DEFAULT_TAIL_SHLIB_HEADERS
set testcase(nr_gen_shlibs) $GenPerfTest::DEFAULT_NR_GEN_SHLIBS
set testcase(nr_compunits) $GenPerfTest::DEFAULT_NR_COMPUNITS
+ set testcase(binary_link_with_shlibs) $GenPerfTest::DEFAULT_BINARY_LINK_WITH_SHLIBS
set testcase(nr_extern_globals) $GenPerfTest::DEFAULT_NR_EXTERN_GLOBALS
set testcase(nr_static_globals) $GenPerfTest::DEFAULT_NR_STATIC_GLOBALS
@@ -281,7 +285,7 @@ namespace eval GenPerfTest {
binary_extra_sources binary_extra_headers
gen_shlib_extra_sources gen_shlib_extra_headers
tail_shlib_sources tail_shlib_headers
- nr_gen_shlibs nr_compunits
+ nr_gen_shlibs nr_compunits binary_link_with_shlibs
nr_extern_globals nr_static_globals
nr_extern_functions nr_static_functions
class_specs
@@ -1298,14 +1302,16 @@ namespace eval GenPerfTest {
proc _make_shlib_options { self_var static run_nr } {
upvar 1 $self_var self
- set nr_gen_shlibs [_get_param $self(nr_gen_shlibs) $run_nr]
set result ""
- for { set i 0 } { $i < $nr_gen_shlibs } { incr i } {
- lappend result "shlib=[_make_shlib_name self $static $run_nr $i]"
- }
- set tail_shlib_name [_make_tail_shlib_name self $static $run_nr]
- if { "$tail_shlib_name" != "" } {
- lappend result "shlib=$tail_shlib_name"
+ if { [_get_param $self(binary_link_with_shlibs) $run_nr] } {
+ set nr_gen_shlibs [_get_param $self(nr_gen_shlibs) $run_nr]
+ for { set i 0 } { $i < $nr_gen_shlibs } { incr i } {
+ lappend result "shlib=[_make_shlib_name self $static $run_nr $i]"
+ }
+ set tail_shlib_name [_make_tail_shlib_name self $static $run_nr]
+ if { "$tail_shlib_name" != "" } {
+ lappend result "shlib=$tail_shlib_name"
+ }
}
return $result
}
--
2.35.3
next prev parent reply other threads:[~2022-05-30 22:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 22:11 [PATCH v2 0/7] gdb.perf/: Add JIT performance test Ilya Leoshkevich via Gdb-patches
2022-05-30 22:11 ` [PATCH v2 1/7] gdb.perf/: Fix tcl_string_list_to_python_list {x} Ilya Leoshkevich via Gdb-patches
2022-05-30 22:11 ` Ilya Leoshkevich via Gdb-patches [this message]
2022-05-30 22:11 ` [PATCH v2 3/7] gdb.perf/: Allow adjusting GenPerfTest compile options Ilya Leoshkevich via Gdb-patches
2022-05-30 22:11 ` [PATCH v2 4/7] gdb.base/: Introduce jit-protocol-util.h Ilya Leoshkevich via Gdb-patches
2022-05-30 22:11 ` [PATCH v2 5/7] gdb.base/: Introduce jit_compile_options Ilya Leoshkevich via Gdb-patches
2022-05-30 22:11 ` [PATCH v2 6/7] gdb.base/: Introduce n_jit_so_address Ilya Leoshkevich via Gdb-patches
2022-05-30 22:11 ` [PATCH v2 7/7] gdb.perf/: Add JIT performance test Ilya Leoshkevich via Gdb-patches
2022-06-22 8:48 ` [PING] [PATCH v2 0/7] " Ilya Leoshkevich via Gdb-patches
2022-08-03 10:52 ` [PING^2] " Ilya Leoshkevich via Gdb-patches
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=20220530221147.1991835-3-iii@linux.ibm.com \
--to=gdb-patches@sourceware.org \
--cc=aburgess@redhat.com \
--cc=arnez@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=pedro@palves.net \
--cc=tromey@adacore.com \
--cc=ulrich.weigand@de.ibm.com \
/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