I don't think the compiler pass should be responsible for it. The service definition should be in a separate config file (``form_debug.xml`` for instance) which would be loaded by the DI extension only when the profiler is enabled