From 58b2eb1af562c292feb6d3cdce4656746e61da75 Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Mon, 15 Jul 2019 15:40:56 +0200 Subject: vlib: convert frame_index into real pointers The fast path almost always has to deal with the real pointers. Deriving the frame pointer from a frame_index requires a load of the 32bit frame_index from memory, another 64bit load of the heap base pointer and some calculations. Lets store the full pointer instead and do a single 64bit load only. This helps avoiding problems when the heap is grown and frames are allocated below vm->heap_aligned_base. Type: refactor Change-Id: Ifa6e6e984aafe1e2755bff80f0a4dfcddee3623c Signed-off-by: Andreas Schultz Signed-off-by: Dave Barach --- src/vnet/unix/gdb_funcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vnet/unix') diff --git a/src/vnet/unix/gdb_funcs.c b/src/vnet/unix/gdb_funcs.c index 7349897d35d..2ebdd5960ca 100644 --- a/src/vnet/unix/gdb_funcs.c +++ b/src/vnet/unix/gdb_funcs.c @@ -111,8 +111,8 @@ vlib_dump_frame_ownership (void) nm->nodes[this_node_runtime->node_index]->name, index - first_nf_index, nm->nodes[owned_runtime->node_index]->name); - fformat (stderr, " nf index %d nf->frame_index %d\n", - nf - vm->node_main.next_frames, nf->frame_index); + fformat (stderr, " nf index %d nf->frame %p\n", + nf - vm->node_main.next_frames, nf->frame); } } } -- cgit 1.2.3-korg