diff options
Diffstat (limited to 'debian/patches/introspection0007-ext2fs-annotate-objects-managed-by-libports.patch')
-rw-r--r-- | debian/patches/introspection0007-ext2fs-annotate-objects-managed-by-libports.patch | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/debian/patches/introspection0007-ext2fs-annotate-objects-managed-by-libports.patch b/debian/patches/introspection0007-ext2fs-annotate-objects-managed-by-libports.patch deleted file mode 100644 index 8c38264a..00000000 --- a/debian/patches/introspection0007-ext2fs-annotate-objects-managed-by-libports.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 28d59b58e0f6bbe93454010349762cbd37978100 Mon Sep 17 00:00:00 2001 -From: Justus Winter <4winter@informatik.uni-hamburg.de> -Date: Wed, 21 May 2014 18:39:38 +0200 -Subject: [PATCH hurd 7/8] ext2fs: annotate objects managed by libports - -Install a specialized version of libpagers format_debug_info which -prints more detailed information, like the nodes inode number for file -pager objects. Also label both pager buckets. - -* ext2fs/pager-create.c (format_debug_info): New function. -(create_disk_pager): Install our own format_debug_info function. -Label both pager buckets. ---- - ext2fs/pager.c | 38 ++++++++++++++++++++++++++++++++++++++ - 1 file changed, 38 insertions(+) - -diff --git a/ext2fs/pager.c b/ext2fs/pager.c -index b56c923..bdffff8 100644 ---- a/ext2fs/pager.c -+++ b/ext2fs/pager.c -@@ -19,10 +19,12 @@ - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - - #include <unistd.h> -+#include <stdio.h> - #include <string.h> - #include <errno.h> - #include <error.h> - #include <hurd/store.h> -+#include <inttypes.h> - #include "ext2fs.h" - - /* XXX */ -@@ -1192,6 +1194,38 @@ disk_cache_block_is_ref (block_t block) - return ref; - } - -+/* Provide a human-readable description of the given pager object. */ -+static error_t -+format_debug_info (const void *port, char *buffer, size_t size) -+{ -+ const struct pager *pager = port; -+ const struct port_info *pi = port; -+ -+ if (pager->upi->type == FILE_DATA) -+ { -+ struct references references; -+ refcounts_references (&pager->upi->node->refcounts, &references); -+ snprintf (buffer, size, -+ "bucket: %s, class: %s, " -+ "node{inode: %"PRIu64", hard: %u, weak: %u}", -+ pi->bucket->label, -+ pi->class->label, -+ pager->upi->node->cache_id, -+ references.hard, -+ references.weak); -+ } -+ else -+ snprintf (buffer, size, -+ "bucket: %s, class: %s, may_cache: %d", -+ pi->bucket->label, -+ pi->class->label, -+ /* XXX I have no idea what might be interesting to print -+ here, but it is straight forward to add stuff. */ -+ pager->may_cache); -+ -+ return 0; -+} -+ - /* Create the disk pager, and the file pager. */ - void - create_disk_pager (void) -@@ -1200,12 +1234,15 @@ create_disk_pager (void) - pthread_attr_t attr; - error_t err; - -+ ports_label_class (_pager_class, "_pager_class", format_debug_info); -+ - /* The disk pager. */ - struct user_pager_info *upi = malloc (sizeof (struct user_pager_info)); - if (!upi) - ext2_panic ("can't create disk pager: %s", strerror (errno)); - upi->type = DISK; - disk_pager_bucket = ports_create_bucket (); -+ ports_label_bucket (disk_pager_bucket, "disk_pager_bucket"); - get_hypermetadata (); - disk_cache_blocks = DISK_CACHE_BLOCKS; - disk_cache_size = disk_cache_blocks << log2_block_size; -@@ -1215,6 +1252,7 @@ create_disk_pager (void) - - /* The file pager. */ - file_pager_bucket = ports_create_bucket (); -+ ports_label_bucket (file_pager_bucket, "file_pager_bucket"); - - /* Start libpagers worker threads. */ - err = pager_start_workers (file_pager_bucket); --- -2.1.4 - |