Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-56 lnet: split lnet_commit_md and cleanup
[fs/lustre-release.git]
/
lnet
/
utils
/
debug.c
diff --git
a/lnet/utils/debug.c
b/lnet/utils/debug.c
index
8a28b4f
..
052dae1
100644
(file)
--- a/
lnet/utils/debug.c
+++ b/
lnet/utils/debug.c
@@
-1,6
+1,4
@@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@
-26,8
+24,10
@@
* GPL HEADER END
*/
/*
* GPL HEADER END
*/
/*
- * Copyright
2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright
(c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2011, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
@@
-367,8
+367,10
@@
static void print_rec(struct dbg_line ***linevp, int used, int fdout)
int bytes;
ssize_t bytes_written;
int bytes;
ssize_t bytes_written;
- bytes = sprintf(out, "%08x:%08x:%u:%u.%06llu:%u:%u:%u:(%s:%u:%s()) %s",
- hdr->ph_subsys, hdr->ph_mask, hdr->ph_cpu_id,
+ bytes = sprintf(out, "%08x:%08x:%u.%u%s:%u.%06llu:%u:%u:%u:(%s:%u:%s()) %s",
+ hdr->ph_subsys, hdr->ph_mask,
+ hdr->ph_cpu_id, hdr->ph_type,
+ hdr->ph_flags & PH_FLAG_FIRST_RECORD ? "F" : "",
hdr->ph_sec, (unsigned long long)hdr->ph_usec,
hdr->ph_stack, hdr->ph_pid, hdr->ph_extern_pid,
line->file, hdr->ph_line_num, line->fn, line->text);
hdr->ph_sec, (unsigned long long)hdr->ph_usec,
hdr->ph_stack, hdr->ph_pid, hdr->ph_extern_pid,
line->file, hdr->ph_line_num, line->fn, line->text);
@@
-415,6
+417,7
@@
static void dump_hdr(unsigned long long offset, struct ptldebug_header *hdr)
fprintf(stderr, " subsystem = %x\n", hdr->ph_subsys);
fprintf(stderr, " mask = %x\n", hdr->ph_mask);
fprintf(stderr, " cpu_id = %u\n", hdr->ph_cpu_id);
fprintf(stderr, " subsystem = %x\n", hdr->ph_subsys);
fprintf(stderr, " mask = %x\n", hdr->ph_mask);
fprintf(stderr, " cpu_id = %u\n", hdr->ph_cpu_id);
+ fprintf(stderr, " type = %u\n", hdr->ph_type);
fprintf(stderr, " seconds = %u\n", hdr->ph_sec);
fprintf(stderr, " microseconds = %lu\n", (long)hdr->ph_usec);
fprintf(stderr, " stack = %u\n", hdr->ph_stack);
fprintf(stderr, " seconds = %u\n", hdr->ph_sec);
fprintf(stderr, " microseconds = %lu\n", (long)hdr->ph_usec);
fprintf(stderr, " stack = %u\n", hdr->ph_stack);
@@
-454,7
+457,7
@@
static int parse_buffer(int fdin, int fdout)
goto readhdr;
if (hdr->ph_len > 4094 || /* is this header bogus? */
goto readhdr;
if (hdr->ph_len > 4094 || /* is this header bogus? */
- hdr->ph_
cpu_id > 65536
||
+ hdr->ph_
type >= libcfs_tcd_type_max()
||
hdr->ph_stack > 65536 ||
hdr->ph_sec < (1 << 30) ||
hdr->ph_usec > 1000000000 ||
hdr->ph_stack > 65536 ||
hdr->ph_sec < (1 << 30) ||
hdr->ph_usec > 1000000000 ||
@@
-601,7
+604,7
@@
int jt_dbg_debug_kernel(int argc, char **argv)
strcpy(filename, argv[1]);
else
sprintf(filename, "%s"CFS_TIME_T".%u",
strcpy(filename, argv[1]);
else
sprintf(filename, "%s"CFS_TIME_T".%u",
- DEBUG_FILE_PATH_DEFAULT, time(NULL), getpid());
+
LIBCFS_
DEBUG_FILE_PATH_DEFAULT, time(NULL), getpid());
if (stat(filename, &st) == 0 && S_ISREG(st.st_mode))
unlink(filename);
if (stat(filename, &st) == 0 && S_ISREG(st.st_mode))
unlink(filename);
@@
-850,18
+853,13
@@
static struct mod_paths {
} mod_paths[] = {
{"libcfs", "libcfs/libcfs"},
{"lnet", "lnet/lnet"},
} mod_paths[] = {
{"libcfs", "libcfs/libcfs"},
{"lnet", "lnet/lnet"},
- {"kciblnd", "lnet/klnds/ciblnd"},
- {"kgmlnd", "lnet/klnds/gmlnd"},
{"kmxlnd", "lnet/klnds/mxlnd"},
{"kmxlnd", "lnet/klnds/mxlnd"},
- {"kiiblnd", "lnet/klnds/iiblnd"},
{"ko2iblnd", "lnet/klnds/o2iblnd"},
{"ko2iblnd", "lnet/klnds/o2iblnd"},
- {"kopeniblnd", "lnet/klnds/openiblnd"},
{"kptllnd", "lnet/klnds/ptllnd"},
{"kqswlnd", "lnet/klnds/qswlnd"},
{"kralnd", "lnet/klnds/ralnd"},
{"ksocklnd", "lnet/klnds/socklnd"},
{"ktdilnd", "lnet/klnds/tdilnd"},
{"kptllnd", "lnet/klnds/ptllnd"},
{"kqswlnd", "lnet/klnds/qswlnd"},
{"kralnd", "lnet/klnds/ralnd"},
{"ksocklnd", "lnet/klnds/socklnd"},
{"ktdilnd", "lnet/klnds/tdilnd"},
- {"kviblnd", "lnet/klnds/viblnd"},
{"lvfs", "lustre/lvfs"},
{"obdclass", "lustre/obdclass"},
{"llog_test", "lustre/obdclass"},
{"lvfs", "lustre/lvfs"},
{"obdclass", "lustre/obdclass"},
{"llog_test", "lustre/obdclass"},
@@
-911,7
+909,6
@@
static int jt_dbg_modules_2_5(int argc, char **argv)
{
struct mod_paths *mp;
char *path = "";
{
struct mod_paths *mp;
char *path = "";
- char *kernel = "linux";
const char *proc = "/proc/modules";
char modname[128], buf[4096];
long modaddr;
const char *proc = "/proc/modules";
char modname[128], buf[4096];
long modaddr;
@@
-919,8
+916,6
@@
static int jt_dbg_modules_2_5(int argc, char **argv)
if (argc >= 2)
path = argv[1];
if (argc >= 2)
path = argv[1];
- if (argc == 3)
- kernel = argv[2];
if (argc > 3) {
printf("%s [path] [kernel]\n", argv[0]);
return 0;
if (argc > 3) {
printf("%s [path] [kernel]\n", argv[0]);
return 0;