trace: only include trace-event-subdirs when they are needed