extern struct ltt_traces ltt_traces;
/* Keep track of trap nesting inside LTT */
-//ust// DECLARE_PER_CPU(unsigned int, ltt_nesting);
-extern unsigned int ltt_nesting;
+extern __thread int ltt_nesting;
typedef int (*ltt_run_filter_functor)(void *trace, uint16_t eID);
//typedef int (*ltt_run_filter_functor)(void *, __u16);
*/
static inline unsigned int ltt_align(size_t align_drift, size_t size_of_type)
{
- return (size_of_type - align_drift) & (size_of_type - 1);
+ size_t alignment = min(sizeof(void *), size_of_type);
+ return (alignment - align_drift) & (alignment - 1);
}
/* Default arch alignment */
#define LTT_ALIGN