This is the mail archive of the systemtap-cvs@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[SCM] systemtap: system-wide probe/trace tool branch, master, updated. release-1.2-64-g9747ca4


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "systemtap: system-wide probe/trace tool".

The branch, master has been updated
       via  9747ca47d45f8746b32035cf77141faa9d88f3aa (commit)
       via  c261711d00e9f01a53c16b1574b680c4ac7bebe6 (commit)
       via  bdc82277738f01b4d4de85158b03b88fa3d10e85 (commit)
      from  aa72ea67cee4f9b25cec199228df81eee267b3cc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9747ca47d45f8746b32035cf77141faa9d88f3aa
Author: Josh Stone <jistone@redhat.com>
Date:   Mon Apr 19 19:55:40 2010 -0700

    PR11473: Document and test foreach "VALUE ="
    
    * NEWS: Blurb it.
    * stap.1.in: Describe it.
    * testsuite/semko/foreachstmt03.stp: Test that stats die in pass-2.
    * testsuite/systemtap.base/foreach_value.stp: Test with various types.
    * testsuite/systemtap.base/foreach_value.exp: Driver for above.
    * testsuite/systemtap.base/optim_arridx.exp: Include value in output.

commit c261711d00e9f01a53c16b1574b680c4ac7bebe6
Author: Josh Stone <jistone@redhat.com>
Date:   Mon Apr 19 17:42:04 2010 -0700

    PR11473: Add explicit iteration values with "VALUE ="
    
    The foreach loops now have an optional "VALUE =" which assigns the
    current iteration value to the named VALUE in each pass of the loop.
    
    * staptree.h (foreach_loop::value): New field with the name to save.
    * parse.cxx (parser::parse_foreach_loop): Parse "VALUE =", which
      requires a lookahead to distinguish from an unbracketed "KEY in".
    * staptree.cxx (foreach_loop::print): Display the value if present.
      (*::visit_foreach_loop): Traverse the value too.
    * elaborate.cxx (*::visit_foreach_loop): Ditto.
      (add_global_var_display): Use "VALUE =" in generated code.
    * translate.cxx (c_unparser::visit_foreach_loop): Assign the value in
      the beginning of every foreach iteration.

commit bdc82277738f01b4d4de85158b03b88fa3d10e85
Author: Josh Stone <jistone@redhat.com>
Date:   Mon Apr 19 17:12:43 2010 -0700

    PR11473: Optimize references to iteration values
    
    When iterating with "foreach", we keep a map_node* which tells us our
    current place in the map (and there's a similar marker for @hist).  Most
    of the time when users index a map within a foreach, it is to get the
    current value using the keys given by foreach.  When we know this is the
    case, we can grab the value from the iterator instead of again searching
    the map.
    
    In the example given in PR11472, with two stat-map accesses within a
    foreach, I recorded 12-15% improvement in runtime.
    
    * translate.cxx (aggvar::get_hist): New accessor for indexing a @hist.
      (mapvar::get_value): New accessor for reading a map iterator.
      (mapvar::get_key): Simplify string NULL-check as done in get_value.
      (c_unparser::visit_foreach_loop_value): New function to see if the
      keys of a foreach are constant in the loop, and thus whether
      references with those keys can be optimized.
      (c_unparser::get_foreach_loop_value): Check for an active iteration
      value which matches the given arrayindex.
      (c_tmpcounter::visit_foreach_loop): Call visit_foreach_loop_value.
      (c_unparser::visit_foreach_loop): Ditto.
      (c_unparser::load_aggregate): Try to use a foreach value.
      (c_unparser::visit_arrayindex): Ditto.
      (c_tmpcounter::visit_arrayindex): Skip some tmps when foreach has it.
      (c_tmpcounter::visit_print_format): Ditto.
      (c_tmpcounter::visit_stat_op): Ditto.

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                       |    4 +
 elaborate.cxx                              |   34 +++++-
 parse.cxx                                  |   48 +++++++-
 stap.1.in                                  |    5 +
 staptree.cxx                               |   21 +++-
 staptree.h                                 |    1 +
 testsuite/semko/foreachstmt03.stp          |   12 ++
 testsuite/systemtap.base/foreach_value.exp |   22 +++
 testsuite/systemtap.base/foreach_value.stp |   26 ++++
 testsuite/systemtap.base/optim_arridx.exp  |    3 +-
 translate.cxx                              |  195 ++++++++++++++++++++++++----
 11 files changed, 338 insertions(+), 33 deletions(-)
 create mode 100755 testsuite/semko/foreachstmt03.stp
 create mode 100644 testsuite/systemtap.base/foreach_value.exp
 create mode 100755 testsuite/systemtap.base/foreach_value.stp


hooks/post-receive
--
systemtap: system-wide probe/trace tool


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]