Normalize polling interval while the target is offline.

This commit is contained in:
Hidetoshi Shimokawa 2004-02-20 10:59:46 +00:00
parent 9f8e4ded12
commit 7d72cc5625
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=126038
2 changed files with 13 additions and 7 deletions

View File

@ -179,7 +179,9 @@ To quit the session, type CR + '~' + '.' in the console port.
Using gdb port is almost the same as remote gdb over serial line except
using TCP/IP instead of /dev/cu*. See
"On-line Kernel Debugging Using Remote GDB"
section of The FreeBSD Developers Handbook.
section of The FreeBSD Developers Handbook and
.Xr gdb 4
for detail.
.Bd -literal -offset indent
% gdb -k kernel.debug
(kgdb) target remote :12345
@ -200,8 +202,8 @@ If you want access to the console using telnet, try the following:
.Ed
.Pp
You may want to keep logging console output of several machines. Conserve-com
in the ports collection should help you. Insert the following lines
in the conserver.cf
in the ports collection may help you. Insert the following lines
in the conserver.cf.
.Bd -literal -offset indent
console local {
master localhost;
@ -229,6 +231,7 @@ console remote {
.Xr ddb 4 ,
.Xr firewire 4 ,
.Xr fwohci 4 ,
.Xr gdb 4 ,
.Xr fwcontrol 8
.Sh AUTHORS
.An Hidetoshi Shimokawa Aq simokawa@FreeBSD.org

View File

@ -63,7 +63,8 @@
#include <sys/errno.h>
#define DCONS_POLL_HZ 100
#define DCONS_POLL_HZ 100
#define DCONS_POLL_OFFLINE 2 /* sec */
#define RETRY 3
@ -75,6 +76,7 @@
int verbose = 0;
int tc_set = 0;
int poll_hz = DCONS_POLL_HZ;
#define IS_CONSOLE(p) ((p)->port == 0)
#define IS_GDB(p) ((p)->port == 1)
@ -765,10 +767,11 @@ dconschat_start_session(struct dcons_state *dc)
int counter = 0;
while (1) {
if ((dc->flags & F_READY) == 0 && (++counter % 200) == 0)
if ((dc->flags & F_READY) == 0 &&
(++counter % (poll_hz * DCONS_POLL_OFFLINE)) == 0)
dconschat_fetch_header(dc);
if ((dc->flags & F_READY) != 0)
dconschat_proc_dcons(dc);
dconschat_proc_dcons(dc);
dconschat_proc_socket(dc);
}
return (0);
@ -808,7 +811,7 @@ main(int argc, char **argv)
struct fw_eui64 eui;
char devname[256], *core = NULL, *system = NULL;
int i, ch, error;
int unit=0, wildcard=0, poll_hz = DCONS_POLL_HZ;
int unit=0, wildcard=0;
int port[DCONS_NPORT];
u_int64_t target = 0;