Hadrian: teach the RTS that PROFILING implies TRACING

As discussed in #16744, both the Make and Hadrian build systems
have special code to always pass -eventlog whenever -prof or -debug
are passed. However, there is some similar logic in the RTS itself only
for defining TRACING when the DEBUG macro is defined, but no such logic
is implemented to define TRACING when the PROFILING macro is defined.
This patch adds such a logic and therefore fixes #16744.
19 jobs for master in 252 minutes (queued for 3 seconds)
Name Stage Failure
failed
validate-x86_64-linux-deb9-hadrian Build
Exit code: 1
Stderr:
)


Uploading artifacts...
junit.xml: found 1 matching files
Uploading artifacts to coordinator... ok
id=99896 responseStatus=201 Created token=jzPGNdmN
ERROR: Job failed: exit code 1
failed
validate-x86_64-windows Full Build
Runtime platform                                    arch=amd64 os=windows pid=3668 revision=1f513601 version=11.10.1
WARNING: ghc-*.tar.xz: no matching files
WARNING: junit.xml: no matching files
ERROR: No files to upload
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=6908 revision=1f513601 version=11.10.1
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit status 128
failed
validate-x86_64-windows-hadrian Full Build
   Speed :           120983062 Bytes/sec.
Speed : 6922.706 MegaBytes/min.
Ended : Wednesday, June 12, 2019 3:56:53 AM

Uploading artifacts...
Runtime platform arch=amd64 os=windows pid=6696 revision=1f513601 version=11.10.1
WARNING: ghc.tar.xz: no matching files
ERROR: No files to upload
ERROR: Job failed: exit status 128
failed
validate-aarch64-linux-deb9 Full Build
$ cp -Rf $HOME/.cabal cabal-cache
Uploading artifacts...
WARNING: ghc-*.tar.xz: no matching files
WARNING: junit.xml: no matching files
ERROR: No files to upload
Uploading artifacts...
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
release-x86_64-linux-deb9-dwarf Build
$ cp -Rf $HOME/.cabal cabal-cache
Uploading artifacts...
ghc-*.tar.xz: found 1 matching files
junit.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=99899 responseStatus=201 Created token=6aJz8onQ
Uploading artifacts...
junit.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=99899 responseStatus=201 Created token=6aJz8onQ
ERROR: Job failed: exit code 1