From a6af96f52e1f0b5ca49bed4e0099a5aa24d96183 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 17 Oct 2010 23:22:04 +0200 Subject: [PATCH] Mention TASK_FINDER_VMA_ENTRY_ITEMS if stap_add_vma_map_info returns -ENOMEM. Suggested by jan.kratochvil@redhat.com, rhbz#643109. * runtime/vma.c (_stp_vma_mmap_cb): Add -DTASK_FINDER_VMA_ENTRY_ITEMS to warning message. --- runtime/vma.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/runtime/vma.c b/runtime/vma.c index e82ed390d..d3b4bbe65 100644 --- a/runtime/vma.c +++ b/runtime/vma.c @@ -138,8 +138,11 @@ static int _stp_vma_mmap_cb(struct stap_task_finder_target *tgt, addr, addr + length, name, module); /* Warn, but don't error out. */ - if (res != 0) - _stp_warn ("Couldn't register module '%s' for pid %d\n", _stp_modules[i]->path, tsk->group_leader->pid); + if (res != 0) { + _stp_warn ("Couldn't register module '%s' for pid %d (%d)\n", _stp_modules[i]->path, tsk->group_leader->pid, res); + if (res == -ENOMEM) + _stp_warn ("Try increasing -DTASK_FINDER_VMA_ENTRY_ITEMS\n"); + } return 0; } } -- 2.43.5