• Steven Rostedt's avatar
    tracing: Combine event filter_active and enable into single flags field · 553552ce
    Steven Rostedt authored
    The filter_active and enable both use an int (4 bytes each) to
    set a single flag. We can save 4 bytes per event by combining the
    two into a single integer.
    
       text	   data	    bss	    dec	    hex	filename
    4913961	1088356	 861512	6863829	 68bbd5	vmlinux.orig
    4894944	1018052	 861512	6774508	 675eec	vmlinux.id
    4894871	1012292	 861512	6768675	 674823	vmlinux.flags
    
    This gives us another 5K in savings.
    
    The modification of both the enable and filter fields are done
    under the event_mutex, so it is still safe to combine the two.
    
    Note: Although Mathieu gave his Acked-by, he would like it documented
     that the reads of flags are not protected by the mutex. The way the
     code works, these reads will not break anything, but will have a
     residual effect. Since this behavior is the same even before this
     patch, describing this situation is left to another patch, as this
     patch does not change the behavior, but just brought it to Mathieu's
     attention.
    
    v2: Updated the event trace self test to for this change.
    Acked-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Acked-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
    Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Cc: Tom Zanussi <tzanussi@gmail.com>
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    553552ce
trace.h 23.6 KB