public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb] Speedup lnp_state_machine::handle_special_opcode
@ 2020-02-23 12:55 gdb-buildbot
  2020-02-23 13:00 ` Failures on Fedora-i686, branch master gdb-buildbot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gdb-buildbot @ 2020-02-23 12:55 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 258bf0ee3748d4354e13daf00f02266cafa96389 ***

commit 258bf0ee3748d4354e13daf00f02266cafa96389
Author:     Richard Biener <rguenther@suse.de>
AuthorDate: Fri Feb 14 08:32:53 2020 +0100
Commit:     Tom de Vries <tdevries@suse.de>
CommitDate: Fri Feb 14 08:32:53 2020 +0100

    [gdb] Speedup lnp_state_machine::handle_special_opcode
    
    I see for some program at gdb startup:
    ...
    Samples: 102K of event 'cycles:pu', Event count (approx.): 91710925103
    Overhead  Command     Shared Object        Symbol
      15.21%  gdb         gdb                  [.]
    lnp_state_machine::handle_special
    ...
    where the divisions are the places we stall.  The following
    micro-optimizes things but it smells like m_line_header->line_range
    is constant, likewise probably m_line_header->maximum_ops_per_instruction
    so eventually the divisions could be avoided completely with some
    lookup table.
    
    Well.  Micro-optimizing with this patch improves things
    (don't expect [load] CSE over the gdbarch_adjust_dwarf2_line call).
    
    Build and reg-tested on x86_64-linux.
    
    gdb/ChangeLog:
    
    2020-02-14  Richard Biener  <rguenther@suse.de>
    
            * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
            on expression with division operators.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index eb3c0a836e..a79aabcbee 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-02-14  Richard Biener  <rguenther@suse.de>
+
+	* dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE
+	on expression with division operators.
+
 2020-02-13  Alok Kumar Sharma  <AlokKumar.Sharma@amd.com>
 
 	* MAINTAINERS (Write After Approval): Adding myself.
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 7edbd9d7df..e74383e01d 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -19812,16 +19812,16 @@ void
 lnp_state_machine::handle_special_opcode (unsigned char op_code)
 {
   unsigned char adj_opcode = op_code - m_line_header->opcode_base;
-  CORE_ADDR addr_adj = (((m_op_index
-			  + (adj_opcode / m_line_header->line_range))
+  unsigned char adj_opcode_d = adj_opcode / m_line_header->line_range;
+  unsigned char adj_opcode_r = adj_opcode % m_line_header->line_range;
+  CORE_ADDR addr_adj = (((m_op_index + adj_opcode_d)
 			 / m_line_header->maximum_ops_per_instruction)
 			* m_line_header->minimum_instruction_length);
   m_address += gdbarch_adjust_dwarf2_line (m_gdbarch, addr_adj, true);
-  m_op_index = ((m_op_index + (adj_opcode / m_line_header->line_range))
+  m_op_index = ((m_op_index + adj_opcode_d)
 		% m_line_header->maximum_ops_per_instruction);
 
-  int line_delta = (m_line_header->line_base
-		    + (adj_opcode % m_line_header->line_range));
+  int line_delta = m_line_header->line_base + adj_opcode_r;
   advance_line (line_delta);
   record_line (false);
   m_discriminator = 0;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Failures on Fedora-i686, branch master
  2020-02-23 12:55 [binutils-gdb] [gdb] Speedup lnp_state_machine::handle_special_opcode gdb-buildbot
@ 2020-02-23 13:00 ` gdb-buildbot
  2020-02-23 13:36 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
  2020-02-23 19:38 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot
  2 siblings, 0 replies; 4+ messages in thread
From: gdb-buildbot @ 2020-02-23 13:00 UTC (permalink / raw)
  To: gdb-testers

Buildername:
        Fedora-i686

Worker:
        fedora-x86-64-3

Full Build URL:
	https://gdb-buildbot.osci.io/#builders/18/builds/2129

Author:
        Richard Biener <rguenther@suse.de>

Commit tested:
        258bf0ee3748d4354e13daf00f02266cafa96389

Subject of commit:
        [gdb] Speedup lnp_state_machine::handle_special_opcode

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-i686/25/258bf0ee3748d4354e13daf00f02266cafa96389/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-i686/25/258bf0ee3748d4354e13daf00f02266cafa96389//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-i686/25/258bf0ee3748d4354e13daf00f02266cafa96389//xfail.table.gz>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Failures on Fedora-x86_64-m64, branch master
  2020-02-23 12:55 [binutils-gdb] [gdb] Speedup lnp_state_machine::handle_special_opcode gdb-buildbot
  2020-02-23 13:00 ` Failures on Fedora-i686, branch master gdb-buildbot
@ 2020-02-23 13:36 ` gdb-buildbot
  2020-02-23 19:38 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot
  2 siblings, 0 replies; 4+ messages in thread
From: gdb-buildbot @ 2020-02-23 13:36 UTC (permalink / raw)
  To: gdb-testers

Buildername:
        Fedora-x86_64-m64

Worker:
        fedora-x86-64-2

Full Build URL:
	https://gdb-buildbot.osci.io/#builders/3/builds/2185

Author:
        Richard Biener <rguenther@suse.de>

Commit tested:
        258bf0ee3748d4354e13daf00f02266cafa96389

Subject of commit:
        [gdb] Speedup lnp_state_machine::handle_special_opcode

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/25/258bf0ee3748d4354e13daf00f02266cafa96389/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i02
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i12
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: multi_scope: second thread: print i22
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: outer_threads: outer stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: outer_threads: outer stop: print j
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: single_scope: second thread: print i3
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/25/258bf0ee3748d4354e13daf00f02266cafa96389//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/25/258bf0ee3748d4354e13daf00f02266cafa96389//xfail.table.gz>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Failures on Fedora-x86_64-cc-with-index, branch master
  2020-02-23 12:55 [binutils-gdb] [gdb] Speedup lnp_state_machine::handle_special_opcode gdb-buildbot
  2020-02-23 13:00 ` Failures on Fedora-i686, branch master gdb-buildbot
  2020-02-23 13:36 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
@ 2020-02-23 19:38 ` gdb-buildbot
  2 siblings, 0 replies; 4+ messages in thread
From: gdb-buildbot @ 2020-02-23 19:38 UTC (permalink / raw)
  To: gdb-testers

Buildername:
        Fedora-x86_64-cc-with-index

Worker:
        fedora-x86-64-1

Full Build URL:
	https://gdb-buildbot.osci.io/#builders/20/builds/2076

Author:
        Richard Biener <rguenther@suse.de>

Commit tested:
        258bf0ee3748d4354e13daf00f02266cafa96389

Subject of commit:
        [gdb] Speedup lnp_state_machine::handle_special_opcode

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/25/258bf0ee3748d4354e13daf00f02266cafa96389/

*** Diff to previous build ***
==============================================
PASS -> FAIL: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: stop with control-c
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 1st thread: print k
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 1st thread: print r
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 1st thread: print z
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 2nd stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 2nd stop: print j
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: single_scope: first thread: print i3
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=0: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/25/258bf0ee3748d4354e13daf00f02266cafa96389//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/25/258bf0ee3748d4354e13daf00f02266cafa96389//xfail.table.gz>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-23 18:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-23 12:55 [binutils-gdb] [gdb] Speedup lnp_state_machine::handle_special_opcode gdb-buildbot
2020-02-23 13:00 ` Failures on Fedora-i686, branch master gdb-buildbot
2020-02-23 13:36 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2020-02-23 19:38 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot

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 read-only IMAP folder(s) and NNTP newsgroup(s).