diff options
author | aw148015 <none@none> | 2008-03-27 14:55:06 -0700 |
---|---|---|
committer | aw148015 <none@none> | 2008-03-27 14:55:06 -0700 |
commit | 29c773b378195388268beedd40b7b2732967d9e2 (patch) | |
tree | 51831beac6914e285c2ad34c9df71780f5b6b6af /usr/src/cmd/filebench/common/misc.c | |
parent | c5f58477f1b190d049c5f4fedeed36e5cc22a1c7 (diff) | |
download | illumos-joyent-29c773b378195388268beedd40b7b2732967d9e2.tar.gz |
6549500 Filebench error reporting requires traditionalization
6672924 The fileserver.f FileBench workload needs to create files too.
6673349 seg fault when variables defined after define stmt
6673391 go_filebench exit code 1
6673928 creating large filesets is slow
Diffstat (limited to 'usr/src/cmd/filebench/common/misc.c')
-rw-r--r-- | usr/src/cmd/filebench/common/misc.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/usr/src/cmd/filebench/common/misc.c b/usr/src/cmd/filebench/common/misc.c index 820f41c2e9..bc0887e904 100644 --- a/usr/src/cmd/filebench/common/misc.c +++ b/usr/src/cmd/filebench/common/misc.c @@ -271,7 +271,7 @@ fatal: va_end(args); if (level == LOG_FATAL) { - (void) fprintf(stdout, "%s\n", line); + (void) fprintf(stderr, "%s\n", line); return; } @@ -283,6 +283,8 @@ fatal: (void) snprintf(buf, sizeof (buf), "%s\n", line); (void) write(filebench_shm->log_fd, buf, strlen(buf)); (void) fsync(filebench_shm->log_fd); + (void) ipc_mutex_unlock(&filebench_shm->msg_lock); + return; } } else if (level == LOG_DUMP) { @@ -290,24 +292,31 @@ fatal: (void) snprintf(buf, sizeof (buf), "%s\n", line); (void) write(filebench_shm->dump_fd, buf, strlen(buf)); (void) fsync(filebench_shm->dump_fd); + (void) ipc_mutex_unlock(&filebench_shm->msg_lock); + return; } } else if (filebench_shm->debug_level > LOG_INFO) { - (void) fprintf(stdout, "%5d: %4.3f: %s", - (int)my_pid, (now - filebench_shm->epoch) / FSECS, - line); - } else { - (void) fprintf(stdout, "%4.3f: %s", + if (level < LOG_INFO) + (void) fprintf(stderr, "%5d: ", (int)my_pid); + else + (void) fprintf(stdout, "%5d: ", (int)my_pid); + } + + if (level < LOG_INFO) { + (void) fprintf(stderr, "%4.3f: %s", (now - filebench_shm->epoch) / FSECS, line); - } - if (level == LOG_ERROR) { if (my_procflow == NULL) - (void) fprintf(stdout, " on line %d", lex_lineno); - } + (void) fprintf(stderr, " on line %d", lex_lineno); - if ((level != LOG_LOG) && (level != LOG_DUMP)) { + (void) fprintf(stderr, "\n"); + (void) fflush(stderr); + } else { + (void) fprintf(stdout, "%4.3f: %s", + (now - filebench_shm->epoch) / FSECS, + line); (void) fprintf(stdout, "\n"); (void) fflush(stdout); } |