Mark system and internal symbols as private symbols in asm

Authored by last_g on Sep 14 2018, 8:56 AM.

Description

Mark system and internal symbols as private symbols in asm

Summary:
This marks system and internal symbols as private in asm output so those
random generated sysmbols won't appear in .symtab

Reasoning:

  • internal symbols don't help to debug because names are just random
  • the symbols style breaks perf logic
  • internal symbols can take ~75% of the .symtab. In the same time .symtab can take about 20% of the binary file size

Notice:
This diff mostly makes sense on top of the D4713 (or similar)

Test Plan:
tests

Perf from D4713

     7.97%  FibbSlow  FibbSlow            [.] c3rM_info
     6.75%  FibbSlow  FibbSlow            [.] 0x000000000032cfa8
     6.63%  FibbSlow  FibbSlow            [.] cifA_info
     4.98%  FibbSlow  FibbSlow            [.] integerzmgmp_GHCziIntegerziType_eqIntegerzh_info
     4.55%  FibbSlow  FibbSlow            [.] chXn_info
     4.52%  FibbSlow  FibbSlow            [.] c3rH_info
     4.45%  FibbSlow  FibbSlow            [.] chZB_info
     4.04%  FibbSlow  FibbSlow            [.] Main_fibbzuslow_info
     4.03%  FibbSlow  FibbSlow            [.] stg_ap_0_fast
     3.76%  FibbSlow  FibbSlow            [.] chXA_info
     3.67%  FibbSlow  FibbSlow            [.] cifu_info
     3.25%  FibbSlow  FibbSlow            [.] ci4r_info
     2.64%  FibbSlow  FibbSlow            [.] s3rf_info
     2.42%  FibbSlow  FibbSlow            [.] s3rg_info
     2.39%  FibbSlow  FibbSlow            [.] integerzmgmp_GHCziIntegerziType_eqInteger_info
     2.25%  FibbSlow  FibbSlow            [.] integerzmgmp_GHCziIntegerziType_minusInteger_info
     2.17%  FibbSlow  FibbSlow            [.] ghczmprim_GHCziClasses_zeze_info
     2.09%  FibbSlow  FibbSlow            [.] cicc_info
     2.03%  FibbSlow  FibbSlow            [.] 0x0000000000331e15
     2.02%  FibbSlow  FibbSlow            [.] s3ri_info
     1.91%  FibbSlow  FibbSlow            [.] 0x0000000000331bb8
     1.89%  FibbSlow  FibbSlow            [.] ci4N_info
...

Perf from this patch:

15.37%  FibbSlow  FibbSlow            [.] Main_fibbzuslow_info
15.33%  FibbSlow  FibbSlow            [.] integerzmgmp_GHCziIntegerziType_minusInteger_info
13.34%  FibbSlow  FibbSlow            [.] integerzmgmp_GHCziIntegerziType_eqIntegerzh_info
 9.24%  FibbSlow  FibbSlow            [.] integerzmgmp_GHCziIntegerziType_plusInteger_info
 9.08%  FibbSlow  FibbSlow            [.] frame_dummy
 8.25%  FibbSlow  FibbSlow            [.] integerzmgmp_GHCziIntegerziType_eqInteger_info
 4.29%  FibbSlow  FibbSlow            [.] 0x0000000000321ab0
 3.84%  FibbSlow  FibbSlow            [.] stg_ap_0_fast
 3.07%  FibbSlow  FibbSlow            [.] ghczmprim_GHCziClasses_zeze_info
 2.39%  FibbSlow  FibbSlow            [.] 0x0000000000321ab7
 1.90%  FibbSlow  FibbSlow            [.] 0x00000000003266b8
 1.88%  FibbSlow  FibbSlow            [.] base_GHCziNum_zm_info
 1.83%  FibbSlow  FibbSlow            [.] 0x0000000000326915
 1.34%  FibbSlow  FibbSlow            [.] 0x00000000003248cc
 1.07%  FibbSlow  FibbSlow            [.] base_GHCziNum_zp_info
 0.98%  FibbSlow  FibbSlow            [.] 0x00000000003247c8
 0.80%  FibbSlow  FibbSlow            [.] 0x0000000000121498
 0.79%  FibbSlow  FibbSlow            [.] stg_gc_noregs
 0.75%  FibbSlow  FibbSlow            [.] 0x0000000000321ad6
 0.67%  FibbSlow  FibbSlow            [.] 0x0000000000321aca
 0.64%  FibbSlow  FibbSlow            [.] 0x0000000000321b4a
 0.61%  FibbSlow  FibbSlow            [.] 0x00000000002ff633

Reviewers: simonmar, niteria, bgamari

Reviewed By: simonmar

Subscribers: lelf, angerman, olsner, rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4722