Oracle Tuning Advisor runs SQL against the DBA_ADVISOR_TASKS, DBA_ADVISOR_PARAMETERS, and DBA_SQL_PROFILES data dictionary views, and uses the DBMS_SQLTUNE package.
There is more information about the Oracle Diagnostics pack
hereYou can search this page for "Diagnostics Pack" for details on what it covers and which Oracle editions include it.