DBMS_MONITOR and DBMS_SYSTEM.set_ev seems to be built around the KSD (Kernel Service Debug) infrastructure.
It would be more convenient having an PL/SQL interface to dbk*/dbg* debug functions.
the current method vie ALTER [SESSION|SYSTEM] set events '....' is quite error prone.