diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-09-26 16:22:43 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-09-26 16:22:43 -0400 |
commit | e91b23bc1b375d7ffb3395aa6909713bd1f23c10 (patch) | |
tree | 108db6ed24efcbeeb9bdee760925c1528afcbd66 | |
parent | b487a14d6d160f38dd1dbabe305b373b37972074 (diff) | |
download | systemtap-steved-e91b23bc1b375d7ffb3395aa6909713bd1f23c10.tar.gz systemtap-steved-e91b23bc1b375d7ffb3395aa6909713bd1f23c10.tar.xz systemtap-steved-e91b23bc1b375d7ffb3395aa6909713bd1f23c10.zip |
sort arrays by value- subject to automagic foreach/printf
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | elaborate.cxx | 3 |
2 files changed, 6 insertions, 1 deletions
@@ -1,5 +1,9 @@ 2008-09-26 Frank Ch. Eigler <fche@elastic.org> + * elaborate.cxx (add_global_var_display): Implicitly sort arrays. + +2008-09-26 Frank Ch. Eigler <fche@elastic.org> + PR 6916 * elaborate.cxx (systemtap_session::print_error): Fix duplicate elimination in face of token compression. diff --git a/elaborate.cxx b/elaborate.cxx index 94bfd1c5..afdc796e 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1234,7 +1234,8 @@ void add_global_var_display (systemtap_session& s) vardecl* idx_v[idx_count]; // Create a foreach loop foreach_loop* fe = new foreach_loop; - fe->sort_direction = 0; + fe->sort_direction = -1; // imply decreasing sort on value + fe->sort_column = 0; // as in foreach ([a,b,c] in array-) { } fe->limit = NULL; // Create indices for the foreach loop |