// SPDX-License-Identifier: GPL-2.0-or-later /* SCTP kernel implementation * (C) Copyright IBM Corp. 2001, 2004 * * This file is part of the SCTP kernel implementation * * Support for memory object debugging. This allows one to monitor the * object allocations/deallocations for types instrumented for this * via the proc fs. * * Please send any bug reports or fixes you make to the * email address(es): * lksctp developers <linux-sctp@vger.kernel.org> * * Written or modified by: * Jon Grimm <jgrimm@us.ibm.com>
*/
/* * Global counters to count raw object allocation counts. * To add new counters, choose a unique suffix for the variable * name as the helper macros key off this suffix to make * life easier for the programmer.
*/
/* An array to make it easy to pretty print the debug information * to the proc fs.
*/ staticstruct sctp_dbg_objcnt_entry sctp_dbg_objcnt[] = {
SCTP_DBG_OBJCNT_ENTRY(sock),
SCTP_DBG_OBJCNT_ENTRY(ep),
SCTP_DBG_OBJCNT_ENTRY(assoc),
SCTP_DBG_OBJCNT_ENTRY(transport),
SCTP_DBG_OBJCNT_ENTRY(chunk),
SCTP_DBG_OBJCNT_ENTRY(bind_addr),
SCTP_DBG_OBJCNT_ENTRY(bind_bucket),
SCTP_DBG_OBJCNT_ENTRY(addr),
SCTP_DBG_OBJCNT_ENTRY(datamsg),
SCTP_DBG_OBJCNT_ENTRY(keys),
};
/* Callback from procfs to read out objcount information. * Walk through the entries in the sctp_dbg_objcnt array, dumping * the raw object counts for each monitored type.
*/ staticint sctp_objcnt_seq_show(struct seq_file *seq, void *v)
{ int i;
/* Initialize the objcount in the proc filesystem. */ void sctp_dbg_objcnt_init(struct net *net)
{ struct proc_dir_entry *ent;
ent = proc_create_seq("sctp_dbg_objcnt", 0,
net->sctp.proc_net_sctp, &sctp_objcnt_seq_ops); if (!ent)
pr_warn("sctp_dbg_objcnt: Unable to create /proc entry.\n");
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.