Pass -fvisibility=hidden to profiler modules. (#16335)
commit3070ab6a96c98c2f31116db691d789ac8ec970e7
authorJo Shields <joshield@microsoft.com>
Tue, 20 Aug 2019 14:17:26 +0000 (20 10:17 -0400)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 20 Aug 2019 14:17:26 +0000 (20 16:17 +0200)
tree8b027e59002edab65103ef7e28f56668bb6b8952
parentb57d52ce774a80463545c7538819b56bcd7dff56
Pass -fvisibility=hidden to profiler modules. (#16335)

* Pass -fvisibility=hidden to profiler modules.

This appears to not break the profilers:

```
directhex@breakfast:/tmp$ nm -g /tmp/ponyponyponypony/lib/libmono-profiler-log.so | grep close_socket_fd
directhex@breakfast:/tmp$
directhex@breakfast:/tmp$ /tmp/ponyponyponypony/bin/mono --profile=log:report bottle.exe
99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 99 bottles of beer on the wall.

[..]

No more bottles of beer on the wall, no more bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.

Mono log profiler data
Profiler version: 3.0
Data version: 17
Arguments: log:report
Architecture: x86-64
Operating system: linux
Mean timer overhead: 86 nanoseconds
Program startup: Mon Aug 19 14:18:30 2019
Program ID: 17715
Server listening on: 41539

JIT summary
Compiled methods: 753
Generated code size: 228046
JIT helpers: 0
JIT helpers code size: 0

GC summary
GC resizes: 0
Max heap size: 0
Object moves: 0

Metadata summary
Loaded images: 3
Loaded assemblies: 3

Exception summary
Throws: 0
Executed finally clauses: 3

Thread summary
Thread: 0x7fcd968c9700, name: "Finalizer"
Thread: 0x7fcd966c8700, name: "Profiler Sampler"
Thread: 0x7fcd9b036780, name: "Main"
Thread: 0x7fcd964c7700, name: "Profiler Helper"
Thread: 0x7fcd954c5700, name: "Profiler Dumper"
Thread: 0x7fcd95cc6700, name: "Profiler Writer"

Domain summary
Domain: (nil), friendly name: "bottle.exe"

Context summary
Context: (nil), domain: (nil)

Counters:
Mono System:
User Time                      : 70.000ms
System Time                    : 0.000ms
Total Time                     : 140.000ms
Working Set                    : 22032384
Private Bytes                  : 63455232
Virtual Bytes                  : 449630208
Page Faults                    : 3004
CPU Load Average - 1min        : 1.870000
CPU Load Average - 5min        : 2.670000
CPU Load Average - 15min       : 2.900000
Mono JIT:
Methods from AOT               : 536
Methods JITted using mono JIT  : 154
Methods JITted using LLVM      : 0

```

* Add missing annotations and includes
mono/profiler/Makefile.am
mono/profiler/aot.c
mono/profiler/coverage.c
mono/profiler/log.c
mono/profiler/vtune.c