Page MenuHomePhabricator

andrewng (Andrew Ng)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 2 2017, 6:37 AM (111 w, 6 d)

Recent Activity

Yesterday

andrewng committed rGccba42c7eb3c: [ELF] Change default output section type to SHT_PROGBITS (authored by andrewng).
[ELF] Change default output section type to SHT_PROGBITS
Tue, Apr 23, 5:37 AM
andrewng committed rG98c858a23be1: [ELF] Change findOrphanPos to only consider live sections (authored by andrewng).
[ELF] Change findOrphanPos to only consider live sections
Tue, Apr 23, 5:18 AM

Thu, Apr 18

andrewng added a comment to D60131: [ELF] Change default output section type to SHT_PROGBITS.

IIUC, you are fixing an issue that a segment whose size is 0 doesn't have a file offset that is congruent modulo page size. Is this correct?

The file offset for an empty segment is not actually significant; we can just set a dummy value. Have you considered that?

Thu, Apr 18, 12:12 AM · Restricted Project

Mon, Apr 15

andrewng added a comment to D60131: [ELF] Change default output section type to SHT_PROGBITS.

Is this patch acceptable or do we need to start looking for an alternative (and most probably more complex solution) to the issue described above?

Mon, Apr 15, 5:07 AM · Restricted Project

Thu, Apr 4

andrewng added a comment to D60273: [ELF] Change findOrphanPos to only consider live sections.

This would be the follow up patch to D60131 as a fix for the orphan PHDR test failure.

Thu, Apr 4, 8:55 AM · Restricted Project
andrewng added a comment to D60131: [ELF] Change default output section type to SHT_PROGBITS.

The follow up patch to fix the orphan PHDR test is D60273.

Thu, Apr 4, 8:55 AM · Restricted Project
andrewng created D60273: [ELF] Change findOrphanPos to only consider live sections.
Thu, Apr 4, 8:51 AM · Restricted Project

Wed, Apr 3

andrewng added a comment to D60131: [ELF] Change default output section type to SHT_PROGBITS.

This seems like the wrong fix to me. Shouldn't we be fixing the alignment bug with respect to segments not changing things like this?

If I recall correctly I made a change to make NOBITS the default because some sections nthat could have been NOBITS we're winding up as PROGBITS. I don't remember the exact details. I'm fairly sure this change regresses that point. You've changedna bunch of test from expecting NOBITS to expecting PROGBITS but that seems unjustified.

Wed, Apr 3, 7:50 AM · Restricted Project
andrewng added a comment to D60131: [ELF] Change default output section type to SHT_PROGBITS.

I am not sure we have the practice to disable the test cases. What do you think about uploading the fix for orphan behavior
in a separate change rebased on this patch too, so that these 2 patches can be reviewed together?
(in that case, having XFAIL here is fine I think).

Wed, Apr 3, 3:15 AM · Restricted Project
andrewng added inline comments to D60131: [ELF] Change default output section type to SHT_PROGBITS.
Wed, Apr 3, 3:09 AM · Restricted Project
andrewng updated the diff for D60131: [ELF] Change default output section type to SHT_PROGBITS.

Updated to address review comments.

Wed, Apr 3, 3:09 AM · Restricted Project
andrewng updated subscribers of D60131: [ELF] Change default output section type to SHT_PROGBITS.
Wed, Apr 3, 2:28 AM · Restricted Project

Tue, Apr 2

andrewng added a comment to D60131: [ELF] Change default output section type to SHT_PROGBITS.

The default was SHT_PROGBITS in the past, and was changed to SHT_NOBITS to "reduce file size". However, it's not clear that it actually reduces output file size, but only reduces the value of file size in the output. In any case, it does cause the alignment problem described and shown in the symbol-only-align.test test.

Tue, Apr 2, 8:27 AM · Restricted Project
andrewng created D60131: [ELF] Change default output section type to SHT_PROGBITS.
Tue, Apr 2, 8:20 AM · Restricted Project

Wed, Mar 27

andrewng committed rGe6b6ab2c6685: [LLD] Restore tests that use "-" as output (authored by andrewng).
[LLD] Restore tests that use "-" as output
Wed, Mar 27, 8:30 AM
andrewng committed rG2fc69abf5be8: [Support] MemoryBlock size should reflect the requested size (authored by andrewng).
[Support] MemoryBlock size should reflect the requested size
Wed, Mar 27, 3:26 AM

Tue, Mar 26

andrewng added a comment to D59824: [LLD] Restore tests that use "-" as output.

I think there are more tests that should use -o - in wasm/target-feature-none.yaml, but otherwise the wasm changes lgtm.

Tue, Mar 26, 11:05 AM · Restricted Project
andrewng added a comment to D59663: [Support] MemoryBlock size should reflect the requested size.

I've added D59824 to restore testing and usage of output to "-".

Tue, Mar 26, 9:22 AM · Restricted Project
andrewng created D59824: [LLD] Restore tests that use "-" as output.
Tue, Mar 26, 9:22 AM · Restricted Project

Mar 21 2019

andrewng added a comment to D59663: [Support] MemoryBlock size should reflect the requested size.

The stdout.s test you added in fact failed on Windows because this change was missing, and @thakis disabled it in rL351949. So, I think we can just re-enable stdout.s to test this.

Mar 21 2019, 5:10 PM · Restricted Project
andrewng added a reviewer for D59663: [Support] MemoryBlock size should reflect the requested size: rnk.
Mar 21 2019, 12:29 PM · Restricted Project
andrewng created D59663: [Support] MemoryBlock size should reflect the requested size.
Mar 21 2019, 12:20 PM · Restricted Project

Feb 26 2019

andrewng committed rGf38b00532118: [TableGen] Make OpcodeMappings sort comparator deterministic NFCI (authored by andrewng).
[TableGen] Make OpcodeMappings sort comparator deterministic NFCI
Feb 26 2019, 10:51 AM
andrewng created D58687: [TableGen] Make OpcodeMappings sort comparator deterministic NFCI.
Feb 26 2019, 10:22 AM · Restricted Project
andrewng committed rG301f304949ad: [clang-format] SpaceBeforeParens for lambda expressions (authored by andrewng).
[clang-format] SpaceBeforeParens for lambda expressions
Feb 26 2019, 6:34 AM

Feb 25 2019

andrewng added a reviewer for D58241: [clang-format] SpaceBeforeParens for lambda expressions: benhamilton.
Feb 25 2019, 7:28 AM · Restricted Project

Feb 21 2019

andrewng added a comment to D58241: [clang-format] SpaceBeforeParens for lambda expressions.

Ping...

Feb 21 2019, 6:03 AM · Restricted Project

Feb 14 2019

andrewng created D58241: [clang-format] SpaceBeforeParens for lambda expressions.
Feb 14 2019, 9:25 AM · Restricted Project
andrewng committed rGd27cf27eb1fe: [Support] Fix TempFile::discard to not leave behind temporary files (authored by andrewng).
[Support] Fix TempFile::discard to not leave behind temporary files
Feb 14 2019, 3:10 AM

Feb 12 2019

andrewng updated the diff for D57960: [Support] Fix TempFile::discard to not leave behind temporary files.

Updated the patch based on review suggestion.

Feb 12 2019, 4:01 AM · Restricted Project

Feb 11 2019

andrewng updated the diff for D57960: [Support] Fix TempFile::discard to not leave behind temporary files.

As suggested, I have switched back to what was my original change to fix this issue.

Feb 11 2019, 2:42 AM · Restricted Project

Feb 8 2019

andrewng added a comment to D57960: [Support] Fix TempFile::discard to not leave behind temporary files.

This class should do a minimum number of attempt to remove a file, instead of trying to remove a file at various points to increase the chance to successfully removing the file. Why don't you close the file before removing the file?

Feb 8 2019, 11:28 AM · Restricted Project
andrewng created D57960: [Support] Fix TempFile::discard to not leave behind temporary files.
Feb 8 2019, 9:45 AM · Restricted Project

Nov 14 2018

andrewng updated subscribers of D54422: [ELF] - Do not ICF two sections with different output sections when using linker scripts.
Nov 14 2018, 4:31 AM

Jul 20 2018

andrewng updated the diff for D49557: [ELF] Fix handling of FDE negative relative PC addr.

Update to the eh-frame-negative-pcrel-sdata8.s test.

Jul 20 2018, 10:18 AM
andrewng updated the diff for D49557: [ELF] Fix handling of FDE negative relative PC addr.

Updated testing as per review comments.

Jul 20 2018, 8:47 AM
andrewng added a comment to D49557: [ELF] Fix handling of FDE negative relative PC addr.

Thanks! How did yoy find this?

Jul 20 2018, 2:47 AM

Jul 19 2018

andrewng created D49557: [ELF] Fix handling of FDE negative relative PC addr.
Jul 19 2018, 10:25 AM

Apr 20 2018

andrewng created D45871: [DebugInfo] Use WithColor for more debug line warnings.
Apr 20 2018, 4:06 AM
andrewng created D45869: [DebugInfo] Fix for split dwarf test on Windows (NFC).
Apr 20 2018, 3:31 AM

Mar 27 2018

andrewng abandoned D44898: [ELF] Fix incorrect deduplication of MergeSyntheticSection's.

Abandoned in favour of D44923.

Mar 27 2018, 8:10 AM
andrewng updated the diff for D44923: [ELF] Disable ICF for synthetic sections.

Updated to address review comments.

Mar 27 2018, 6:49 AM
andrewng added a comment to D44898: [ELF] Fix incorrect deduplication of MergeSyntheticSection's.

2.8%. Somehow clang-fsds got 2.39% faster.

That speedup is interesting. I don't have a good theory to explain it though.

Even if this patch is somewhat performance-neutral, we still should avoid extra memory allocation if we can. Let's try ignoring synthetic sections in ICF. That's I think better.

Mar 27 2018, 6:07 AM
andrewng created D44923: [ELF] Disable ICF for synthetic sections.
Mar 27 2018, 6:04 AM

Mar 26 2018

andrewng added a comment to D44898: [ELF] Fix incorrect deduplication of MergeSyntheticSection's.

How much did Scylla get slower?

Maybe the best option is just disabling ICF of synthetic sections?

That sounds like a better way of fixing the issue.

Mar 26 2018, 3:07 PM
andrewng updated the diff for D44898: [ELF] Fix incorrect deduplication of MergeSyntheticSection's.

Updated to fix issue with clang compilation.

Mar 26 2018, 9:40 AM
andrewng updated the diff for D44682: [ELF] Fix X86 & X86_64 PLT retpoline padding.

Removed assertions and tidied up white space a little.

Mar 26 2018, 9:25 AM
andrewng updated the diff for D44898: [ELF] Fix incorrect deduplication of MergeSyntheticSection's.

Updated test to address review comments.

Mar 26 2018, 9:14 AM
andrewng added a comment to D44898: [ELF] Fix incorrect deduplication of MergeSyntheticSection's.

Seems reasonable. I will just do a quick check on the performance impact.

Mar 26 2018, 8:56 AM
andrewng created D44898: [ELF] Fix incorrect deduplication of MergeSyntheticSection's.
Mar 26 2018, 8:31 AM

Mar 25 2018

andrewng added a comment to D44682: [ELF] Fix X86 & X86_64 PLT retpoline padding.

I think the PLT writing should handle the padding itself. It certainly feels more correct. It looks though D44775 is heading in that direction too.

Mar 25 2018, 10:15 AM

Mar 21 2018

andrewng added a comment to D44682: [ELF] Fix X86 & X86_64 PLT retpoline padding.

Instead of doing this, we should fill executable segments with trap instructions even if linker script is in use, shouldn't we?

Mar 21 2018, 3:27 AM

Mar 20 2018

andrewng updated subscribers of D44682: [ELF] Fix X86 & X86_64 PLT retpoline padding.
Mar 20 2018, 8:27 AM
andrewng created D44682: [ELF] Fix X86 & X86_64 PLT retpoline padding.
Mar 20 2018, 8:21 AM

Mar 15 2018

andrewng added a comment to D44168: [ELF] Add .eh_frame pieces to map file.

Looking at the EhFrameSection writing and finalize code, it would seem that
some kind of alignment is being applied. This aligning is also the reason
why for x86_64 the mapping of CIE/FDE's to the output is so fragmented,
because all input we have seen is 4-byte aligned, but LLD uses 8-byte
alignment for the output.

Mar 15 2018, 8:08 AM

Mar 9 2018

andrewng added a comment to D44168: [ELF] Add .eh_frame pieces to map file.

Apart from the typo and the value for the alignment, LGTM.

Mar 9 2018, 6:32 AM
andrewng abandoned D42960: [ELF] Add .eh_frame pieces to map file.

Abandoning this revision in favour of D44168.

Mar 9 2018, 6:24 AM

Mar 8 2018

andrewng added a comment to D42960: [ELF] Add .eh_frame pieces to map file.

There are also some slight differences in the output between this implementation and the one in D44168. This patch does not output the "+0x0" for a zero offset and outputs the input section's alignment for the "Align" column. Which style of output is preferred?

Mar 8 2018, 2:22 AM

Mar 7 2018

andrewng updated the diff for D42960: [ELF] Add .eh_frame pieces to map file.

Updated to address review comments.

Mar 7 2018, 5:24 AM

Mar 6 2018

andrewng added a comment to D44168: [ELF] Add .eh_frame pieces to map file.

I agree that this change is simpler, but it also doesn't produce the same output as D42960. Part of the reason for the "complexity" in my change in D42960 was to try to prevent the map file output from getting too big/verbose.

Mar 6 2018, 11:14 AM
andrewng updated the diff for D42960: [ELF] Add .eh_frame pieces to map file.

Updated to address comments.

Mar 6 2018, 9:50 AM
andrewng retitled D42960: [ELF] Add .eh_frame pieces to map file from [ELF] DEMO: Example for adding .eh_frame pieces to map file to [ELF] Add .eh_frame pieces to map file.
Mar 6 2018, 9:42 AM

Mar 1 2018

andrewng updated the diff for D42960: [ELF] Add .eh_frame pieces to map file.

Rebased and updated with minor change to make the output offset hex rather than decimal. Modified existing map file test to demonstrate the proposed .eh_frame output.

Mar 1 2018, 7:43 AM
andrewng commandeered D42960: [ELF] Add .eh_frame pieces to map file.
Mar 1 2018, 7:39 AM

Nov 22 2017

andrewng added a comment to D40366: [Support][Parallel] ThreadPoolExecutor fixes for Windows.

I absolutely do not want to disable support for ConcRT under any circumstances unless we find that it is a completely broken library, which I highly doubt. Even then, I would want to ask Microsoft to fix it.

What is the exact problem you're running into?

Nov 22 2017, 11:08 AM
andrewng created D40366: [Support][Parallel] ThreadPoolExecutor fixes for Windows.
Nov 22 2017, 10:35 AM

Nov 16 2017

andrewng added a comment to D40119: [Support][CachePruning] Fix regression in pruning interval.
Nov 16 2017, 9:28 AM

Oct 16 2017

andrewng abandoned D38964: [TableGen] Workaround for VS 2015 Update 3 RelWithDebInfo build.

Workaround no longer required. This issue is also fixed by commit r315932.

Oct 16 2017, 1:55 PM
andrewng created D38964: [TableGen] Workaround for VS 2015 Update 3 RelWithDebInfo build.
Oct 16 2017, 10:47 AM

Oct 10 2017

andrewng closed D38690: [LLD] Fix findOrphanPos to consistently ignore "dead" OutputSection's.

Committed in rL315292: [LLD] Fix findOrphanPos to consistently ignore "dead" OutputSection's.

Oct 10 2017, 3:16 AM

Oct 9 2017

andrewng created D38690: [LLD] Fix findOrphanPos to consistently ignore "dead" OutputSection's.
Oct 9 2017, 8:44 AM

Oct 6 2017

andrewng abandoned D38539: [LLD] Do not unlink OutputFile prematurely.

Abandoned in favour of change https://reviews.llvm.org/D38571.

Oct 6 2017, 1:46 AM

Oct 5 2017

andrewng added a comment to D38539: [LLD] Do not unlink OutputFile prematurely.
In D38539#889005, @ruiu wrote:

Can you try https://reviews.llvm.org/D38571 to see if it will fix your problem? Thanks.

Oct 5 2017, 5:09 AM

Oct 4 2017

andrewng added a comment to D38539: [LLD] Do not unlink OutputFile prematurely.

What is the problem? std::thread::detach is a part of C++11, and it is hard to believe that we shouldn't use it at all.

Oct 4 2017, 10:25 AM
andrewng added a comment to D38539: [LLD] Do not unlink OutputFile prematurely.
In D38539#888333, @ruiu wrote:

From my understanding of FileOutputBuffer::commit in its current form, it does a call to sys::fs::rename for a regular file. So there is no direct association to the "unlink" performance issue described in the comment to unlinkAsync. Although, it could be that the implementation of rename on Linux could suffer from similar performance problems (i.e. it effectively still performs an unlink). Previously, FileOutputBuffer::create did remove (unlink) the target file. I believe that you recently removed this behaviour and it was this unlink that the unlinkAsync was trying to improve.

If you try it yourself, you'd realize that rename(2)'ing onto an existing file is as slow as calling unlink(2) on that file. My previous change to FileOutputBuffer doesn't fix the correctness issue in the usual use case, but it also improved the speed of lld, because lld no longer tries to unlink a file in the main thread. Before making that change, it tried to do that in the Driver by tryCreateFile.

Oct 4 2017, 9:53 AM
andrewng added a comment to D38539: [LLD] Do not unlink OutputFile prematurely.

Hi Rui,

Oct 4 2017, 9:31 AM
andrewng created D38539: [LLD] Do not unlink OutputFile prematurely.
Oct 4 2017, 6:44 AM

Sep 6 2017

andrewng updated the diff for D37462: [LLD] Fix padding of .eh_frame when in executable segment.

Updated based on suggestion. I still think that keeping the common "AlignSize" is better and safer.

Sep 6 2017, 3:08 AM

Sep 5 2017

andrewng added a comment to D37462: [LLD] Fix padding of .eh_frame when in executable segment.

A similar fix was required for the string table, see https://reviews.llvm.org/D36267.

Sep 5 2017, 3:38 AM
andrewng created D37462: [LLD] Fix padding of .eh_frame when in executable segment.
Sep 5 2017, 3:33 AM

Jul 5 2017

andrewng added a comment to D34976: [lit] Fix unit test discovery for Visual Studio builds..

Is this patch good to land?

Jul 5 2017, 10:45 AM

Jul 4 2017

andrewng added a comment to D34976: [lit] Fix unit test discovery for Visual Studio builds..

This patch fixes a Windows Visual Studio build lit issue introduced by rL306895 (D34855).

Jul 4 2017, 1:49 AM
andrewng updated subscribers of D34976: [lit] Fix unit test discovery for Visual Studio builds..
Jul 4 2017, 1:44 AM
andrewng created D34976: [lit] Fix unit test discovery for Visual Studio builds..
Jul 4 2017, 1:43 AM
andrewng added a comment to D34855: [lit] Factor out listdir logic shared by different test formats..

Ah, I just noticed the D34853, it fixes the issue I am observing.

Jul 4 2017, 12:53 AM
andrewng added a comment to D34853: Fix (benignly) incorrect GoogleTest specs in various lit configs..

I believe that this "build mode" is intended for the Visual Studio MSVC build. This build is special in that it can produce builds for multiple configurations, e.g. Debug, Release & RelWithDebInfo, within the same top level build output directory. It is this configuration type that defines the "build mode". This means that the unit tests will only pick up the configuration that matches that of the lit that was run. Without the "build mode" I believe lit might end up running all configurations of unit tests that have been built, which is probably not the intended behaviour.

Jul 4 2017, 12:35 AM · Restricted Project, lld

Jun 29 2017

andrewng added a comment to D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..

Hi Rafael,

Is this patch now good to land?

Cheers,
Andrew

Jun 29 2017, 6:30 AM

Jun 26 2017

andrewng added a comment to D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..

Hi Rafael,

Jun 26 2017, 10:02 AM
andrewng updated the diff for D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..

Updated for review comments.

Jun 26 2017, 2:22 AM
andrewng updated the summary of D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..
Jun 26 2017, 2:19 AM

Jun 23 2017

andrewng added a comment to D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..

Is there any more feedback on this patch or is it good to land?

Jun 23 2017, 9:36 AM

Jun 21 2017

andrewng added a comment to D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..
In D34204#786240, @ruiu wrote:

Can you change your program?

Jun 21 2017, 11:06 AM

Jun 20 2017

andrewng added a comment to D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..
In D34204#784448, @ruiu wrote:

Hi Andrew,

What are you actually trying to address with this patch? I'd like to know more about the background as to why you want this. Is there any reason you can't fix your program rather than the linker?

Jun 20 2017, 3:12 AM

Jun 19 2017

andrewng added a comment to D34203: [LLD][LinkerScript] Add support for segment NONE..

Is this patch good to land?

Jun 19 2017, 3:04 AM

Jun 16 2017

andrewng removed reviewers for D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments.: jhenderson, bd1976bris, edd, gbreynoo.
Jun 16 2017, 1:51 AM
andrewng removed reviewers for D34203: [LLD][LinkerScript] Add support for segment NONE.: jhenderson, bd1976bris, edd, gbreynoo.
Jun 16 2017, 1:49 AM

Jun 14 2017

andrewng created D34204: [LLD][LinkerScript] Allow non-alloc sections to be assigned to segments..
Jun 14 2017, 6:41 AM
andrewng created D34203: [LLD][LinkerScript] Add support for segment NONE..
Jun 14 2017, 6:29 AM

May 18 2017

andrewng added inline comments to D33112: Optimize orphan plament in a general way.
May 18 2017, 4:52 AM

May 5 2017

andrewng added a comment to D32910: [Lit] Fix to prevent creation of "%SystemDrive%" directory on Windows..

I don't disbelieve you, but do you have any thoughts about why I've never seen this when running tests locally?

May 5 2017, 8:39 AM