[RFC,v2,4/6] mem_region: log region name on mem_alloc failure

Message ID 20180628025501.20676-5-stewart@linux.ibm.com
State RFC
Headers show
Series
  • Faster fast reboot (2x!)
Related show

Commit Message

Stewart Smith June 28, 2018, 2:54 a.m.
This can help with debugging when trying to do node local
allocations.

Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
---
 core/mem_region.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/core/mem_region.c b/core/mem_region.c
index b8ed15fba74d..571ee52c929c 100644
--- a/core/mem_region.c
+++ b/core/mem_region.c
@@ -447,8 +447,8 @@  void *mem_alloc(struct mem_region *region, size_t size, size_t align,
 	if (r)
 		return r;
 
-	prerror("mem_alloc(0x%lx, 0x%lx, \"%s\") failed !\n",
-		size, align, location);
+	prerror("mem_alloc(0x%lx, 0x%lx, \"%s\", %s) failed !\n",
+		size, align, location, region->name);
 	mem_dump_allocs();
 	return NULL;
 }