[Linux1394-cvslog] rev 626 - trunk
Brought to you by:
aeb,
bencollins
From: SVN U. <ben...@li...> - 2002-10-20 15:52:47
|
Author: bencollins Date: 2002-10-20 11:52:44 -0400 (Sun, 20 Oct 2002) New Revision: 626 Modified: trunk/ieee1394_transactions.c trunk/ieee1394_types.h trunk/nodemgr.c Log: Add a "total allocations" member to the tpool struct. Maybe we should have a "packet stats" config option. Modified: trunk/ieee1394_transactions.c ============================================================================== --- trunk/ieee1394_transactions.c (original) +++ trunk/ieee1394_transactions.c 2002-10-20 11:52:45.000000000 -0400 @@ -139,7 +139,7 @@ tp->next = (packet->tlabel + 1) % 64; /* Should _never_ happen */ BUG_ON(test_and_set_bit(packet->tlabel, &tp->pool)); - + tp->allocations++; spin_unlock_irqrestore(&tp->lock, flags); return 0; Modified: trunk/nodemgr.c ============================================================================== --- trunk/nodemgr.c (original) +++ trunk/nodemgr.c 2002-10-20 11:52:45.000000000 -0400 @@ -87,6 +87,7 @@ struct node_entry *ne; int len; char *out = page; + unsigned long flags; if (down_interruptible(&nodemgr_serialize)) return -EINTR; @@ -106,7 +107,12 @@ PUTF(" Vendor ID : `%s' [0x%06x]\n", ne->vendor_name ?: "Unknown", ne->vendor_id); PUTF(" Capabilities: 0x%06x\n", ne->capabilities); - PUTF(" Free tlabels: %d\n", atomic_read(&ne->tpool->count.count) + 1); + PUTF(" Tlabel stats:\n"); + spin_lock_irqsave(&ne->tpool->lock, flags); + PUTF(" Free : %d\n", atomic_read(&ne->tpool->count.count) + 1); + PUTF(" Alloc'd: %u\n", ne->tpool->allocations); + PUTF(" Mask : %016lx\n", ne->tpool->pool); + spin_unlock_irqrestore(&ne->tpool->lock, flags); PUTF(" Bus Options :\n"); PUTF(" IRMC(%d) CMC(%d) ISC(%d) BMC(%d) PMC(%d) GEN(%d)\n" " LSPD(%d) MAX_REC(%d) CYC_CLK_ACC(%d)\n", Modified: trunk/ieee1394_types.h ============================================================================== --- trunk/ieee1394_types.h (original) +++ trunk/ieee1394_types.h 2002-10-20 11:52:45.000000000 -0400 @@ -67,6 +67,7 @@ u64 pool; spinlock_t lock; u8 next; + u32 allocations; struct semaphore count; }; |