+ fLayout = trace.getEventLayout();
+ fEventNames = buildEventNames(fLayout);
+ }
+
+ private static @NonNull Map<String, Integer> buildEventNames(ILttngUstEventLayout layout) {
+ ImmutableMap.Builder<String, Integer> builder = ImmutableMap.builder();
+ builder.put(layout.eventLibcMalloc(), MALLOC_INDEX);
+ builder.put(layout.eventLibcFree(), FREE_INDEX);
+ builder.put(layout.eventLibcCalloc(), CALLOC_INDEX);
+ builder.put(layout.eventLibcRealloc(), REALLOC_INDEX);
+ builder.put(layout.eventLibcMemalign(), MEMALIGN_INDEX);
+ builder.put(layout.eventLibcPosixMemalign(), POSIX_MEMALIGN_INDEX);
+ return builder.build();