This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc 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]

GNU C Library master sources branch master updated. glibc-2.18-280-g40fefba


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 "GNU C Library master sources".

The branch, master has been updated
       via  40fefba1b5b05d05a3a4b48796a1006db90d8f74 (commit)
      from  dcc2dd3f46e6cd532527ed041103633f99efb611 (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 -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=40fefba1b5b05d05a3a4b48796a1006db90d8f74

commit 40fefba1b5b05d05a3a4b48796a1006db90d8f74
Author: Torvald Riegel <triegel@redhat.com>
Date:   Tue Oct 8 14:04:10 2013 +0300

    benchtests: Add include-sources directive.
    
    This adds the "include-sources" directive to scripts/bench.pl.  This
    allows for including source code (vs including headers, which might get
    a different search path) after the inclusion of any headers.

diff --git a/ChangeLog b/ChangeLog
index 521f675..1291b75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-10  Torvald Riegel  <triegel@redhat.com>
+
+	* scripts/bench.pl: Add include-sources directive.
+	* benchtests/README: Update documentation.
+
 2013-10-10  Joseph Myers  <joseph@codesourcery.com>
 
 	* soft-fp/soft-fp.h (FP_INIT_EXCEPTIONS): New macro.
diff --git a/benchtests/README b/benchtests/README
index 5faca53..0c643a6 100644
--- a/benchtests/README
+++ b/benchtests/README
@@ -51,9 +51,12 @@ one to add `foo' to the bench tests:
     inputs.
   - ret: This should be assigned the type that the function returns.  This
     directive may be skipped if the function does not return a value.
-  - includes: This should be assigned a comma separated list of headers that
+  - includes: This should be assigned a comma-separated list of headers that
     need to be included to provide declarations for the function and types it
-    may need.
+    may need (specifically, this includes using "#include <header>").
+  - include-sources: This should be assigned a comma-separated list of source
+    files that need to be included to provide definitions of global variables
+    and functions (specifically, this includes using "#include "source").
   - name: See following section for instructions on how to use this directive.
 
   Lines beginning with a single hash '#' are treated as comments.  See
diff --git a/scripts/bench.pl b/scripts/bench.pl
index 5fe95d0..492ab81 100755
--- a/scripts/bench.pl
+++ b/scripts/bench.pl
@@ -34,7 +34,8 @@ my $getret = "";
 my $variant = "";
 my @curvals;
 my %vals;
-my @include_files;
+my @include_headers;
+my @include_sources;
 my $incl;
 
 open INPUTS, "<$func-inputs" or die $!;
@@ -43,7 +44,7 @@ LINE:while (<INPUTS>) {
   chomp;
 
   # Directives.
-  if (/^## (\w+): (.*)/) {
+  if (/^## ([\w-]+): (.*)/) {
     # Function argument types.
     if ($1 eq "args") {
       @args = split(":", $2);
@@ -55,7 +56,11 @@ LINE:while (<INPUTS>) {
     }
 
     elsif ($1 eq "includes") {
-      @include_files = split (",", $2);
+      @include_headers = split (",", $2);
+    }
+
+    elsif ($1 eq "include-sources") {
+      @include_sources = split (",", $2);
     }
 
     # New variant.  This is the only directive allowed in the body of the
@@ -72,6 +77,10 @@ LINE:while (<INPUTS>) {
       undef @curvals;
       next LINE;
     }
+
+    else {
+      die "Unknown directive: ".$1;
+    }
   }
 
   # Skip over comments.
@@ -86,10 +95,15 @@ my $bench_func = "#define CALL_BENCH_FUNC(v, i) $func (";
 
 
 # Print the definitions and macros.
-foreach $incl (@include_files) {
+foreach $incl (@include_headers) {
   print "#include <" . $incl . ">\n";
 }
 
+# Print the source files.
+foreach $incl (@include_sources) {
+  print "#include \"" . $incl . "\"\n";
+}
+
 if (@args > 0) {
   # Save values in the last variant.
   $vals{$variant} = \@curvals;

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

Summary of changes:
 ChangeLog         |    5 +++++
 benchtests/README |    7 +++++--
 scripts/bench.pl  |   22 ++++++++++++++++++----
 3 files changed, 28 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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