You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Mike Abbott <mj...@trudge.engr.sgi.com> on 1999/11/04 01:30:52 UTC
[PATCH] 10x performance increase patch #10
Apache Developers,
Here is my final patch for increasing Apache's performance. This one
includes Irix-specific optimizations and fixes one typo in the tuning
guide from patch #9.
The base for this patch is Apache/1.3.6 + 10x performance increase
patches #1 through #9. I'll soon port all my patches to the latest
Apache release and publish performance results.
The complete set of patches is currently available from my home page.
As always, I welcome your review, questions, and feedback.
--
Michael J. Abbott mja@sgi.com http://reality.sgi.com/mja
========================================================================
diff -Naur apache_1.3.6+01-09/htdocs/manual/misc/fin_wait_2.html apache_1.3.6+01-10/htdocs/manual/misc/fin_wait_2.html
--- apache_1.3.6+01-09/htdocs/manual/misc/fin_wait_2.html Mon Mar 22 16:17:43 1999
+++ apache_1.3.6+01-10/htdocs/manual/misc/fin_wait_2.html Wed Nov 3 13:57:18 1999
@@ -189,7 +189,8 @@
support a timeout. For IRIX 5.3, 6.2, and 6.3,
use patches 1654, 1703 and 1778 respectively. If you
have trouble locating these patches, please contact your
- SGI support channel for help.
+ SGI support channel for help. IRIX 6.5 supports the timeout
+ without needing a patch.
<LI><A HREF="http://www.ncr.com/">NCR's MP RAS Unix</A> 2.xx and
3.xx both have FIN_WAIT_2 timeouts. In 2.xx it is non-tunable
at 600 seconds, while in 3.xx it defaults to 600 seconds and
diff -Naur apache_1.3.6+01-09/htdocs/manual/misc/perf-mja.html apache_1.3.6+01-10/htdocs/manual/misc/perf-mja.html
--- apache_1.3.6+01-09/htdocs/manual/misc/perf-mja.html Wed Nov 3 10:28:37 1999
+++ apache_1.3.6+01-10/htdocs/manual/misc/perf-mja.html Wed Nov 3 14:37:29 1999
@@ -295,7 +295,7 @@
<CODE>configure</CODE> options:
<UL>
<LI>
- <CODE>--enable-module=mmap_static</CODE>
+ <CODE>--enable-module=mmap_static --enable-module=info</CODE>
</UL>
<LI>
Compilation options:
diff -Naur apache_1.3.6+01-09/src/include/ap_config.h apache_1.3.6+01-10/src/include/ap_config.h
--- apache_1.3.6+01-09/src/include/ap_config.h Thu Sep 2 10:14:17 1999
+++ apache_1.3.6+01-10/src/include/ap_config.h Wed Nov 3 13:57:33 1999
@@ -198,14 +198,18 @@
* there's some weird conflict with non-BSD signals */
#define NO_KILLPG
#undef NO_SETSID
-#if !defined(USE_FLOCK_SERIALIZED_ACCEPT) && \
- !defined(USE_USLOCK_SERIALIZED_ACCEPT) && \
- !defined(USE_SYSVSEM_SERIALIZED_ACCEPT)
+#undef USE_FCNTL_SERIALIZED_ACCEPT
+#undef USE_FLOCK_SERIALIZED_ACCEPT
+#undef USE_USLOCK_SERIALIZED_ACCEPT
+#undef USE_SYSVSEM_SERIALIZED_ACCEPT
+#if IRIX >= 65
+#define NO_SERIALIZED_ACCEPT
+#else
#define USE_FCNTL_SERIALIZED_ACCEPT
#endif
#define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
#define HAVE_SHMGET 1
-#define USE_SHMGET_SCOREBOARD
+#define USE_MMAP_SCOREBOARD
#define HAVE_MMAP 1
#define USE_MMAP_FILES
#define NO_LONG_DOUBLE
diff -Naur apache_1.3.6+01-09/src/main/alloc.c apache_1.3.6+01-10/src/main/alloc.c
--- apache_1.3.6+01-09/src/main/alloc.c Thu Jul 8 12:15:38 1999
+++ apache_1.3.6+01-10/src/main/alloc.c Wed Nov 3 13:57:42 1999
@@ -681,8 +681,12 @@
char *first_avail = blok->h.first_avail;
char *new_first_avail;
- if (reqsize <= 0)
+ if (reqsize <= 0) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
return NULL;
+ }
new_first_avail = first_avail + size;
diff -Naur apache_1.3.6+01-09/src/main/buff.c apache_1.3.6+01-10/src/main/buff.c
--- apache_1.3.6+01-09/src/main/buff.c Thu Sep 2 10:17:06 1999
+++ apache_1.3.6+01-10/src/main/buff.c Wed Nov 3 13:57:47 1999
@@ -239,6 +239,20 @@
else
#endif
rv = (int) read(fb->fd_in, buf, nbyte);
+
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+/*
+ * Try to prefetch the first cache line of the read data ASAP so it's
+ * ready in the primary cache when the (ultimate) caller touches it.
+ * The cache line is prefetched for writing because the read data is
+ * often modified, and in this multi-process server there is going to be
+ * little to no penalty for owning the cache line exclusively
+ * unnecessarily (unlike on a highly-contended cache line in a
+ * multi-threaded server).
+ */
+# pragma prefetch_manual = 1
+# pragma prefetch_ref = ((char *) buf)[0], kind = wr
+#endif
return rv;
}
diff -Naur apache_1.3.6+01-09/src/main/http_main.c apache_1.3.6+01-10/src/main/http_main.c
--- apache_1.3.6+01-09/src/main/http_main.c Wed Oct 20 16:42:16 1999
+++ apache_1.3.6+01-10/src/main/http_main.c Wed Nov 3 13:58:07 1999
@@ -961,9 +961,10 @@
#endif
/* On some architectures it's safe to do unserialized accept()s in the single
- * Listen case. But it's never safe to do it in the case where there's
+ * Listen case. But it's never(*) safe to do it in the case where there's
* multiple Listen statements. Define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
* when it's safe in the single Listen case.
+ * (*) multiple Listen unserialized accepts are safe on Irix 6.5
*/
#ifdef SINGLE_LISTEN_UNSERIALIZED_ACCEPT
#define SAFE_ACCEPT(stmt) {if(!ap_single_listen && ap_listeners->next != ap_listeners) {stmt;}}
@@ -1162,6 +1163,9 @@
}
#else
if (alarm_fn && x && fn != alarm_fn) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, NULL,
"ap_set_callback_and_alarm: possible nested timer!");
}
@@ -1170,6 +1174,9 @@
old = alarm(x);
#else
if (child_timeouts) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
old = alarm(x);
}
else {
@@ -2141,8 +2148,12 @@
int old_status;
short_score *ss;
- if (child_num < 0)
+ if (child_num < 0) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
return -1;
+ }
ap_sync_scoreboard_image();
ss = &ap_scoreboard_image->servers[child_num];
@@ -2153,6 +2164,9 @@
#endif
if (ap_extended_status) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
#ifndef OPTIMIZE_TIMEOUTS
ss->last_used = time(NULL);
#endif
@@ -2186,6 +2200,9 @@
}
}
if (status == SERVER_STARTING && r == NULL) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
/* clean up the slot's vhostrec pointer (maybe re-used)
* and mark the slot as belonging to a new generation.
*/
@@ -3397,7 +3414,7 @@
head_listener = ap_listeners;
close_unused_listeners();
-#ifdef NO_SERIALIZED_ACCEPT
+#if defined(NO_SERIALIZED_ACCEPT) && (!defined(IRIX) || IRIX < 65)
/* warn them about the starvation problem if they're using multiple
* sockets
*/
@@ -3834,6 +3851,9 @@
!ap_single_listen &&
#endif
ap_listeners->next != ap_listeners) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
/* more than one socket */
memcpy(&main_fds, &listenfds, sizeof(fd_set));
srv = ap_select(listenmaxfd + 1, &main_fds, NULL, NULL, NULL);
@@ -3975,6 +3995,9 @@
/* protect various fd_sets */
if (csd >= FD_SETSIZE) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, NULL,
"[csd] filedescriptor (%u) larger than FD_SETSIZE (%u) "
"found, you probably need to rebuild Apache with a "
@@ -4006,7 +4029,14 @@
}
}
+#if defined(IRIX) && IRIX >= 65
+ /*
+ * TCP_NODELAY is inherited from the accepting socket in Irix
+ * 6.5 and beyond.
+ */
+#else
sock_disable_nagle(csd);
+#endif
(void) ap_update_child_status(my_child_num, SERVER_BUSY_READ,
(request_rec *) NULL);
@@ -4066,8 +4096,12 @@
if (r->status == HTTP_OK)
ap_process_request(r);
- if(ap_extended_status)
+ if(ap_extended_status) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
increment_counts(my_child_num, r);
+ }
if (!current_conn->keepalive || current_conn->aborted)
break;
@@ -4078,6 +4112,9 @@
ap_sync_scoreboard_image();
if (ap_scoreboard_image->global.running_generation != ap_my_generation) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
ap_bclose(conn_io);
clean_child_exit(0);
}
diff -Naur apache_1.3.6+01-09/src/main/http_protocol.c apache_1.3.6+01-10/src/main/http_protocol.c
--- apache_1.3.6+01-09/src/main/http_protocol.c Thu Sep 2 10:26:41 1999
+++ apache_1.3.6+01-10/src/main/http_protocol.c Wed Nov 3 13:58:21 1999
@@ -810,12 +810,33 @@
/* 16 == strlen("GET / HTTP/1.0\n\n"): minimal valid request */
if (n >= 16 &&
+#ifdef IRIX
+ /* use big-endian multi-character constant for speed */
+ *(unsigned int *) r->rqbuf == 'GET '
+#else
r->rqbuf[0] == 'G' &&
r->rqbuf[1] == 'E' &&
r->rqbuf[2] == 'T' &&
- r->rqbuf[3] == ' ') {
+ r->rqbuf[3] == ' '
+#endif
+ ) {
char *cp, *ep;
+#if defined(IRIX) && _MIPS_SIM != _ABIO32 && \
+ CACHE_ALIGNMENT > 0 && RQBUF_SIZE > CACHE_ALIGNMENT
+/*
+ * The first cache line was prefetched in ap_read() and used above; now
+ * try to prefetch the second cache line so parsing can proceed without
+ * delay. The cache line is prefetched for writing because parsing
+ * involves modification. With CACHE_ALIGNMENT=128, most request lines
+ * are smaller than two cache lines. Unfortunately the compiler doesn't
+ * yet allow "prefetch_ref = r->rqbuf[CACHE_ALIGNMENT]" so hard-code
+ * 128.
+ */
+# pragma prefetch_manual = 1
+# pragma prefetch_ref = r->rqbuf[/*CACHE_ALIGNMENT*/ 128], kind = wr
+#endif
+
/* find the end of the uri */
cp = &r->rqbuf[4]; /* 4 == strlen("GET ") */
ep = &r->rqbuf[n - 11]; /* 11 == strlen(" HTTP/1.0\n\n") */
@@ -985,6 +1006,17 @@
const char *h1name, *h1value;
int remain;
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+/*
+ * Prefetch cache lines of the request headers so parsing can proceed
+ * without delay. The lines are prefetched for writing because parsing
+ * involves modification. Attempts to prefetch bogus addresses will
+ * simply have no effect and will raise no exceptions.
+ */
+# pragma prefetch_manual = 1
+# pragma prefetch_ref = r->rqhdr[0], kind = wr
+#endif
+
ok = 0;
nh = ap_table_elts(r->headers_in)->nelts;
@@ -1005,6 +1037,15 @@
while (hp < ep && nh < mh) {
char *name, *value;
+#if defined(IRIX) && _MIPS_SIM != _ABIO32 && CACHE_ALIGNMENT > 0
+/*
+ * Unfortunately the compiler doesn't yet allow "prefetch_ref =
+ * hp[CACHE_ALIGNMENT]" so hard-code 128.
+ */
+# pragma prefetch_ref = hp[/*CACHE_ALIGNMENT*/ 128], kind = wr
+# pragma prefetch_ref = hp[/*CACHE_ALIGNMENT * 2*/ 256], kind = wr
+#endif
+
name = hp;
/* find a : (end of name) */
@@ -1035,6 +1076,9 @@
if (hp + 1 < ep && hp[1] != ' ' && hp[1] != '\t') {
hp[-(hp[-1] == '\r')] = 0; /* null-terminate value */
hp++;
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+# pragma prefetch_ref = hp[0], kind = wr
+#endif
if (headers) {
/* insert into established table */
@@ -1198,6 +1242,9 @@
ap_keepalive_timeout("read request line", r);
if (!quickly_read_request_line(r) && !read_request_line(r)) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
ap_kill_timeout(r);
if (r->status == HTTP_REQUEST_URI_TOO_LARGE) {
@@ -1212,10 +1259,17 @@
}
if (!r->assbackwards) {
ap_hard_timeout("read request headers", r);
- if (!quickly_get_mime_headers(r))
+ if (!quickly_get_mime_headers(r)) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
get_mime_headers(r);
+ }
ap_kill_timeout(r);
if (r->status != HTTP_REQUEST_TIME_OUT) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
"request failed: error reading the headers");
ap_send_error_response(r, 0);
@@ -1260,6 +1314,9 @@
if ((!r->hostname && (r->proto_num >= HTTP_VERSION(1,1))) ||
((r->proto_num == HTTP_VERSION(1,1)) &&
!ap_table_get(r->headers_in, "Host"))) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
/*
* Client sent us an HTTP/1.1 or later request without telling us the
* hostname, either with a full URL or a Host: header. We therefore
@@ -1301,6 +1358,9 @@
}
if ((access_status = ap_run_post_read_request(r))) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
ap_die(access_status, r);
ap_log_transaction(r);
return NULL;
diff -Naur apache_1.3.6+01-09/src/main/http_request.c apache_1.3.6+01-10/src/main/http_request.c
--- apache_1.3.6+01-09/src/main/http_request.c Thu Sep 2 11:40:06 1999
+++ apache_1.3.6+01-10/src/main/http_request.c Wed Nov 3 13:58:27 1999
@@ -1222,13 +1222,23 @@
{
int old_stat;
- if (ap_extended_status)
+ if (ap_extended_status) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
ap_time_process_request(r->connection->child_num, START_PREQUEST);
+ }
#ifdef USE_QSC
- if (!qsc_process_request(r))
+ if (!qsc_process_request(r)) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
#endif
process_request_internal(r);
+#ifdef USE_QSC
+ }
+#endif
old_stat = ap_update_child_status(r->connection->child_num,
SERVER_BUSY_LOG, r);
@@ -1244,8 +1254,12 @@
ap_log_transaction(r);
(void) ap_update_child_status(r->connection->child_num, old_stat, r);
- if (ap_extended_status)
+ if (ap_extended_status) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
ap_time_process_request(r->connection->child_num, STOP_PREQUEST);
+ }
}
static table *rename_original_env(pool *p, table *t)
diff -Naur apache_1.3.6+01-09/src/main/qsc.c apache_1.3.6+01-10/src/main/qsc.c
--- apache_1.3.6+01-09/src/main/qsc.c Thu Sep 2 12:48:21 1999
+++ apache_1.3.6+01-10/src/main/qsc.c Wed Nov 3 13:58:35 1999
@@ -395,8 +395,12 @@
struct qsc_entry *ep;
ep = qsc->hash_table[qsc_hash_uri(uri) % QSC_HASH_SIZE];
- while (ep && (ep->server != server || strcmp(ep->uri, uri)))
+ while (ep && (ep->server != server || strcmp(ep->uri, uri))) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
ep = ep->next;
+ }
/* printf("%d: qsc_lookup_uri(%s, 0x%08x) -> 0x%08x\n", getpid(), uri, server, ep); */
@@ -618,27 +622,47 @@
switch (ap_tolower(tep->key[0])) {
case 'a':
- if (!strcasecmp(tep->key, "authorization"))
+ if (!strcasecmp(tep->key, "authorization")) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
cachable = 0;
+ }
break;
case 'c':
- if (!strcasecmp(tep->key, "cache-control"))
+ if (!strcasecmp(tep->key, "cache-control")) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
cachable = 0;
+ }
break;
case 'i':
if (!strcasecmp(tep->key, "if-modified-since") ||
!strcasecmp(tep->key, "if-none-match") ||
- !strcasecmp(tep->key, "if-range"))
+ !strcasecmp(tep->key, "if-range")) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
cachable = 0;
+ }
break;
case 'p':
if (!strcasecmp(tep->key, "pragma") &&
- !strcasecmp(tep->val, "no-cache"))
+ !strcasecmp(tep->val, "no-cache")) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
cachable = 0;
+ }
break;
case 'r':
- if (!strcasecmp(tep->key, "range"))
+ if (!strcasecmp(tep->key, "range")) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
cachable = 0;
+ }
break;
}
}
diff -Naur apache_1.3.6+01-09/src/main/util.c apache_1.3.6+01-10/src/main/util.c
--- apache_1.3.6+01-09/src/main/util.c Mon Jul 19 17:15:52 1999
+++ apache_1.3.6+01-10/src/main/util.c Wed Nov 3 13:58:41 1999
@@ -191,6 +191,9 @@
} last;
if (sec != last.time) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
last.time = sec;
ap_gm_timestr_822_buf(last.str, sizeof last.str, sec);
}
@@ -212,8 +215,12 @@
* unless there is no timekeeper.
*/
time_t t = ap_scoreboard_image ? ap_scoreboard_image->global.time : 0;
- if (t == 0)
+ if (t == 0) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
t = time(NULL);
+ }
return t;
#else
return time(NULL);
@@ -237,6 +244,9 @@
time_t tt = ap_time();
if (tt != gmt_info.time) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
gmt_info.time = tt;
gmt_info.tm = *localtime(&tt);
gmt_info.off = (int) (gmt_info.tm.tm_gmtoff / 60);
@@ -251,6 +261,9 @@
time_t tt = ap_time();
if (tt != gmt_info.time) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
struct tm *gmt;
int days, hours;
diff -Naur apache_1.3.6+01-09/src/modules/experimental/mod_mmap_static.c apache_1.3.6+01-10/src/modules/experimental/mod_mmap_static.c
--- apache_1.3.6+01-09/src/modules/experimental/mod_mmap_static.c Wed Oct 20 16:51:19 1999
+++ apache_1.3.6+01-10/src/modules/experimental/mod_mmap_static.c Wed Nov 3 13:58:52 1999
@@ -248,6 +248,9 @@
c = (int) (a->finfo.st_ino - b->finfo.st_ino);
if (c == 0) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
return (int) (a->finfo.st_dev - b->finfo.st_dev);
}
return c;
@@ -330,10 +333,20 @@
#endif
/* we don't handle anything but GET */
- if (r->method_number != M_GET) return DECLINED;
+ if (r->method_number != M_GET) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
+ return DECLINED;
+ }
/* file doesn't exist, we won't be dealing with it */
- if (r->finfo.st_mode == 0) return DECLINED;
+ if (r->finfo.st_mode == 0) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
+ return DECLINED;
+ }
sconf = ap_get_module_config(r->server->module_config, &mmap_static_module);
tmp.finfo.st_dev = r->finfo.st_dev;
@@ -342,6 +355,9 @@
pmatch = (a_file **)bsearch(&ptmp, sconf->inode_sorted->elts,
sconf->inode_sorted->nelts, sizeof(a_file *), inode_compare);
if (pmatch == NULL) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
return DECLINED;
}
match = *pmatch;
@@ -352,8 +368,12 @@
/* This handler has no use for a request body (yet), but we still
* need to read and discard it if the client sent one.
*/
- if ((errstatus = ap_discard_request_body(r)) != OK)
+ if ((errstatus = ap_discard_request_body(r)) != OK) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
return errstatus;
+ }
ap_update_mtime(r, match->finfo.st_mtime);
@@ -371,8 +391,12 @@
ap_set_etag(r);
- if ((errstatus = ap_meets_conditions(r)) != OK)
+ if ((errstatus = ap_meets_conditions(r)) != OK) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
return errstatus;
+ }
/*
* ap_set_content_length() always converts the same number and never
diff -Naur apache_1.3.6+01-09/src/modules/standard/mod_log_config.c apache_1.3.6+01-10/src/modules/standard/mod_log_config.c
--- apache_1.3.6+01-09/src/modules/standard/mod_log_config.c Mon Jul 19 16:45:21 1999
+++ apache_1.3.6+01-10/src/modules/standard/mod_log_config.c Wed Nov 3 13:59:05 1999
@@ -302,6 +302,9 @@
char *rvalue = r->connection->user;
if (rvalue && *rvalue == 0) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
rvalue = "\"\"";
*rlen = 2;
}
@@ -352,6 +355,9 @@
if (r->status > 0) {
if (r->status != last.status) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
last.status = r->status;
last.len = sprintf(last.str, "%d", last.status);
}
@@ -428,6 +434,9 @@
if (!a || !*a) {
time_t now = ap_time();
if (now != last.time) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
char sign;
size_t l;
@@ -811,8 +820,12 @@
char *s;
#ifdef BUFFERED_LOGS
- if (len + cls->outcnt > LOG_BUFSIZE)
+ if (len + cls->outcnt > LOG_BUFSIZE) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
flush_log(cls);
+ }
if (len < LOG_BUFSIZE) {
for (i = 0, s = &cls->outbuf[cls->outcnt]; i < iovcnt; i++) {
memcpy(s, iovec[i].iov_base, iovec[i].iov_len);
@@ -852,8 +865,12 @@
(void *) log_remote_address(r, NULL, &iovec[0].iov_len) :
(void *) log_remote_host(r, NULL, &iovec[0].iov_len);
if (iovec[0].iov_base) {
- if (iovec[0].iov_len == 0)
+ if (iovec[0].iov_len == 0) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
iovec[0].iov_len = strlen(iovec[0].iov_base);
+ }
} else {
iovec[0].iov_base = (void *) &sqsdn[3];
iovec[0].iov_len = 1;
@@ -892,8 +909,12 @@
/* "%t" */
iovec[6].iov_len = 0;
iovec[6].iov_base = (void *) log_request_time(r, NULL, &iovec[6].iov_len);
- if (iovec[6].iov_len == 0)
+ if (iovec[6].iov_len == 0) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
iovec[6].iov_len = strlen(iovec[6].iov_base);
+ }
/* " \"" */
iovec[7].iov_base = (void *) sqsdn;
@@ -902,8 +923,12 @@
/* "%r" */
iovec[8].iov_len = 0;
iovec[8].iov_base = (void *) log_request_line(orig, NULL, &iovec[8].iov_len);
- if (iovec[8].iov_len == 0)
+ if (iovec[8].iov_len == 0) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
iovec[8].iov_len = strlen(iovec[8].iov_base);
+ }
/* "\" " */
iovec[9].iov_base = (void *) &sqsdn[1];
@@ -913,8 +938,12 @@
iovec[10].iov_len = 0;
iovec[10].iov_base = (void *) log_status(r, NULL, &iovec[10].iov_len);
if (iovec[10].iov_base) {
- if (iovec[10].iov_len == 0)
+ if (iovec[10].iov_len == 0) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
iovec[10].iov_len = strlen(iovec[10].iov_base);
+ }
} else {
iovec[10].iov_base = (void *) &sqsdn[3];
iovec[10].iov_len = 1;
@@ -961,6 +990,9 @@
struct iovec local_iovec[20], *iovec;
if (cls->fname == NULL) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
return DECLINED;
}
@@ -969,6 +1001,9 @@
* to make.
*/
if (cls->condition_var != NULL) {
+#if defined(IRIX) && _MIPS_SIM != _ABIO32
+#pragma mips_frequency_hint NEVER
+#endif
envar = cls->condition_var;
if (*envar != '!') {
if (ap_table_get(r->subprocess_env, envar) == NULL) {