Page MenuHomePhabricator

avl (Alexey Lapshin)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 17 2017, 6:34 AM (178 w, 4 d)

Recent Activity

Fri, Jan 15

avl updated the diff for D93106: [dsymutil][DWARFLinker][NFC] make AddressManager not depending on the order of checks for relocations..

rebased. changed enumerator to the container.

Fri, Jan 15, 12:15 PM · Restricted Project
avl added inline comments to D93106: [dsymutil][DWARFLinker][NFC] make AddressManager not depending on the order of checks for relocations..
Fri, Jan 15, 12:13 PM · Restricted Project

Tue, Jan 12

avl accepted D94323: [dsymutil] Add preliminary support for DWARF 5..

LGTM with small comment inside.

Tue, Jan 12, 12:43 PM · Restricted Project
avl added inline comments to D93106: [dsymutil][DWARFLinker][NFC] make AddressManager not depending on the order of checks for relocations..
Tue, Jan 12, 2:54 AM · Restricted Project
avl added inline comments to D94323: [dsymutil] Add preliminary support for DWARF 5..
Tue, Jan 12, 2:50 AM · Restricted Project
avl added inline comments to D94323: [dsymutil] Add preliminary support for DWARF 5..
Tue, Jan 12, 2:40 AM · Restricted Project

Mon, Jan 11

avl added inline comments to D94323: [dsymutil] Add preliminary support for DWARF 5..
Mon, Jan 11, 4:58 AM · Restricted Project
avl added inline comments to D94323: [dsymutil] Add preliminary support for DWARF 5..
Mon, Jan 11, 4:41 AM · Restricted Project
avl added a comment to D85614: [TRE] Reland: allow TRE for non-capturing calls..

ping

Mon, Jan 11, 3:14 AM · Restricted Project
avl added a comment to D93106: [dsymutil][DWARFLinker][NFC] make AddressManager not depending on the order of checks for relocations..

ping

Mon, Jan 11, 3:13 AM · Restricted Project

Fri, Jan 8

avl added a comment to D94323: [dsymutil] Add preliminary support for DWARF 5..

If I understood correctly, It looks like this change is not enough to work properly for DWARF5.
Currently, relocation is checked using offsets to the attribute:

Fri, Jan 8, 2:14 PM · Restricted Project

Sun, Jan 3

avl committed rGf5f7ff8d0faa: [dsymutil][DWARFLinker][NFC] Refactor usages of UniquingStringPool. (authored by avl).
[dsymutil][DWARFLinker][NFC] Refactor usages of UniquingStringPool.
Sun, Jan 3, 3:52 AM
avl closed D93460: [dsymutil][DWARFLinker][NFC] Refactor usages of UniquingStringPool..
Sun, Jan 3, 3:52 AM · Restricted Project

Wed, Dec 23

avl added a comment to D91693: [Support] Add reserve() method to the raw_ostream..

@avl - it might be this and the related patch/usage in llvm-objcopy deserve an llvm-dev design thread about the overall issues you're trying to solve and the design directions you've explored and the ones you are proposing.

Wed, Dec 23, 9:58 AM · Restricted Project

Tue, Dec 22

avl added a comment to D93460: [dsymutil][DWARFLinker][NFC] Refactor usages of UniquingStringPool..

Thank you! Will address comments.

Tue, Dec 22, 12:15 PM · Restricted Project

Dec 18 2020

avl added a comment to D91028: [llvm-objcopy][NFC] replace class Buffer/MemBuffer/FileBuffer with streams..

Aren't many MemoryBuffers backed by memory mapped files, which aren't necessarily causing real memory usage? Could that approach be used here?

Dec 18 2020, 6:08 AM · Restricted Project

Dec 17 2020

avl requested review of D93460: [dsymutil][DWARFLinker][NFC] Refactor usages of UniquingStringPool..
Dec 17 2020, 7:56 AM · Restricted Project

Dec 16 2020

avl added a comment to D91028: [llvm-objcopy][NFC] replace class Buffer/MemBuffer/FileBuffer with streams..

Colleagues, so what is your opinion on this refactoring? Is it OK to use streams as output data for llvm-objcopy?

Dec 16 2020, 6:29 AM · Restricted Project
avl added a reviewer for D91028: [llvm-objcopy][NFC] replace class Buffer/MemBuffer/FileBuffer with streams.: dblaikie.
Dec 16 2020, 6:27 AM · Restricted Project

Dec 14 2020

avl added a comment to D85614: [TRE] Reland: allow TRE for non-capturing calls..

ping.

Dec 14 2020, 2:18 AM · Restricted Project

Dec 11 2020

avl requested review of D93106: [dsymutil][DWARFLinker][NFC] make AddressManager not depending on the order of checks for relocations..
Dec 11 2020, 4:58 AM · Restricted Project

Dec 10 2020

avl committed rG693da9df7481: [dsymutil][DWARFLinker][NFC] Make interface of AddressMap more general. (authored by avl).
[dsymutil][DWARFLinker][NFC] Make interface of AddressMap more general.
Dec 10 2020, 3:57 AM
avl closed D87723: [dsymutil][DWARFLinker][NFC] Make interface of AddressMap more general..
Dec 10 2020, 3:57 AM · Restricted Project

Dec 1 2020

avl added a comment to D91693: [Support] Add reserve() method to the raw_ostream..

Honestly, I don't have the time to look at this process in detail, and refactoring things to support an objcopy library is not high on my priority list. I'm not convinced that your suggestions are actually going to be workable/useful in practice, if I'm honest, and have tried to outline my concerns already.

Dec 1 2020, 2:36 PM · Restricted Project
avl added a comment to D91693: [Support] Add reserve() method to the raw_ostream..

@jhenderson James, what do you think of using streams as suggested by D91028 and D91693? Would it be useful? It seems it would reduce amount of copied data.

Dec 1 2020, 4:52 AM · Restricted Project

Nov 27 2020

avl added a comment to D91693: [Support] Add reserve() method to the raw_ostream..

It's not immediately clear to me which data you're concerned about loading into memory, but it's worth remembering that objcopy will need to have all the data (or at least its size) in its internal representation before it can write most bits, at least for ELF objcopy, because the section header offset field is part of the ELF header, but the section header table itself is at the end.

Nov 27 2020, 5:47 AM · Restricted Project

Nov 25 2020

avl added a comment to D91693: [Support] Add reserve() method to the raw_ostream..

@jhenderson Summary of proposed approach:

Nov 25 2020, 6:53 AM · Restricted Project

Nov 23 2020

avl added a comment to D91844: [llvm][clang] Add checks for the smart pointers with the possibility to be null.

The change for DWARFLinker is fine. I also think it is better to split the patch up into separate patches.

Nov 23 2020, 11:48 AM · Restricted Project, Restricted Project
avl added a comment to D91028: [llvm-objcopy][NFC] replace class Buffer/MemBuffer/FileBuffer with streams..

update for Note 3. It was considered to be not useful to implement reserve() method as fixed-size memory-mapped file(D91693). Instead it was suggested to implement resizable raw_mmap_ostream.
Thus, if we need to have memory mapped file for objcopy then we have this alternative - implement resizable raw_mmap_ostream.

Nov 23 2020, 1:37 AM · Restricted Project

Nov 20 2020

avl added a comment to D91693: [Support] Add reserve() method to the raw_ostream..

Yeah, I suppose that's reasonable. Though, if the scope of this is small (e.g.: it only needs to write to files _or_ memory buffers, and it's not going go have a lot of callers/large surface area), I would not completely dismiss some custom solution either...

Nov 20 2020, 5:37 AM · Restricted Project
avl added a comment to D91693: [Support] Add reserve() method to the raw_ostream..

Not really. :( For resize, I would expect that it has a physical effect on the underlying object (changing file size), which is good, I guess. But I would still expect that it is possible to write more data than that size, and have it be appended, as that's what our other streams do. I would also expect this operation to also have some effect on raw_string_ostream (changing the underlying string size) and such. And I am still worried about using mmap(2)/write(2) interchangeably. The two apis have different characteristics, and I don't think that can be conveyed by a single method call. E.g., the mmap approach will not respect O_APPEND, it will cause SIGBUS if the file is concurrently truncated (that's why our mmap APIs like MemoryBuffer have IsVolatile arguments), etc.

Nov 20 2020, 2:09 AM · Restricted Project

Nov 19 2020

avl added a comment to D91693: [Support] Add reserve() method to the raw_ostream..

I second the separate class idea. It seems like it could be much cleaner. The normal treatment of reserve-like methods is that of a hint -- one that the implementation could ignore or adjust in some circumstances -- I wouldn't expect that calling this method would completely change the way in which a file is accessed, nor that writing "beyond" the reserved storage would result in an assertion...

Nov 19 2020, 9:25 AM · Restricted Project
avl updated the diff for D91693: [Support] Add reserve() method to the raw_ostream..

addressed minor comments.

Nov 19 2020, 9:04 AM · Restricted Project

Nov 18 2020

avl added a comment to D91693: [Support] Add reserve() method to the raw_ostream..

For raw_fd_ostream, I wonder if we should actually just have a separate class e.g. raw_mmap_ostream, rather than trying to make raw_fd_ostream represent two possible different things. For other streams, I'm not sure the reserving behaviour is useful - strings and vectors could be reserved from outside the wrapping stream, for example.

Nov 18 2020, 5:06 AM · Restricted Project
avl requested review of D91693: [Support] Add reserve() method to the raw_ostream..
Nov 18 2020, 2:41 AM · Restricted Project

Nov 16 2020

avl updated the diff for D91028: [llvm-objcopy][NFC] replace class Buffer/MemBuffer/FileBuffer with streams..

addressed comments.

Nov 16 2020, 9:31 AM · Restricted Project
avl added inline comments to D91028: [llvm-objcopy][NFC] replace class Buffer/MemBuffer/FileBuffer with streams..
Nov 16 2020, 4:11 AM · Restricted Project
avl added a comment to D85614: [TRE] Reland: allow TRE for non-capturing calls..

ping.

Nov 16 2020, 1:26 AM · Restricted Project
avl added a comment to D91028: [llvm-objcopy][NFC] replace class Buffer/MemBuffer/FileBuffer with streams..

ping.

Nov 16 2020, 1:25 AM · Restricted Project

Nov 13 2020

avl added a comment to D91404: RFC: [ELF] Add --dwarf32-before-dwarf64 to place DWARF32 input sections before DWARF64.

Well, this is a bit different from my original idea but is an overall good heuristic for many of the debug sections. It works for .debug_info, which is one of the biggest sections; it does not work for .debug_line, though, which is not that big as .debug_info, but potentially might become problematic in the (distant) future; it also does not work for .debug_abbrev, .debug_addr, .debug_ranges, and some others, which are usually not that big. However, the patch should be extended to support .debug_str, which can be even larger than .debug_info.

Nov 13 2020, 5:48 AM · Restricted Project

Nov 8 2020

avl updated the summary of D91028: [llvm-objcopy][NFC] replace class Buffer/MemBuffer/FileBuffer with streams..
Nov 8 2020, 3:01 AM · Restricted Project
avl updated the summary of D91028: [llvm-objcopy][NFC] replace class Buffer/MemBuffer/FileBuffer with streams..
Nov 8 2020, 3:00 AM · Restricted Project
avl requested review of D91028: [llvm-objcopy][NFC] replace class Buffer/MemBuffer/FileBuffer with streams..
Nov 8 2020, 2:58 AM · Restricted Project

Nov 7 2020

avl accepted D90873: [DWARFLinker] Convert analyzeContextInfo to a work list (NFC).

LGTM. with small inline comments.

Nov 7 2020, 2:26 AM · Restricted Project

Nov 6 2020

avl added inline comments to D90873: [DWARFLinker] Convert analyzeContextInfo to a work list (NFC).
Nov 6 2020, 1:33 PM · Restricted Project

Nov 2 2020

avl added a comment to D88827: [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library..

Using a stream approach sounds reasonable. I don't really know what the benefits are of using a memory mapped file versus other options (I vaguely recall from some older work that they improve performance, but am not sure if that is still the case or not). The one concern I'd have with a stream for writing output is if we ever need to jump back and forth within the object for some reason. Without looking at the existing objcopy code, I don't know if there are any instances where this happens though.

Nov 2 2020, 5:03 AM · Restricted Project

Nov 1 2020

avl added a comment to D88827: [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library..

Folks, Before creating a patch I would like to consult what would be the best option to refactor the Buffer class.
One of the alternatives is described here https://reviews.llvm.org/D88827#2321871 ("Adapter" approach).

Nov 1 2020, 1:08 PM · Restricted Project
avl updated the diff for D87723: [dsymutil][DWARFLinker][NFC] Make interface of AddressMap more general..

addressed comments(changed text of commentary).

Nov 1 2020, 1:58 AM · Restricted Project

Oct 23 2020

avl updated the diff for D85614: [TRE] Reland: allow TRE for non-capturing calls..

changed patch so that all temporarily variables created first,
and then copy these variables into incoming parameters.

Oct 23 2020, 7:00 AM · Restricted Project

Oct 22 2020

avl added a comment to D88827: [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library..

To summarize comments - I am going to:

Oct 22 2020, 11:17 PM · Restricted Project
avl added inline comments to D89216: [dsymutil] Add the ability to run the DWARF verifier on the input.
Oct 22 2020, 2:59 PM · Restricted Project
avl updated the diff for D85614: [TRE] Reland: allow TRE for non-capturing calls..

corrected byvalue operand`s alignment calculation.

Oct 22 2020, 9:07 AM · Restricted Project
avl planned changes to D69372: [X86][VARARG] Avoid spilling xmm vararg arguments..
Oct 22 2020, 3:00 AM · Restricted Project
avl planned changes to D80163: [X86][VARARG] Avoid spilling xmm registers for va_start..
Oct 22 2020, 2:59 AM · Restricted Project
avl added inline comments to D89216: [dsymutil] Add the ability to run the DWARF verifier on the input.
Oct 22 2020, 2:54 AM · Restricted Project

Oct 21 2020

avl added inline comments to D85614: [TRE] Reland: allow TRE for non-capturing calls..
Oct 21 2020, 9:41 AM · Restricted Project
avl added inline comments to D85614: [TRE] Reland: allow TRE for non-capturing calls..
Oct 21 2020, 7:57 AM · Restricted Project
avl updated the diff for D88827: [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library..

addressed comments: renamed files, added doxygen comments into library headers(except CopyConfig.h).

Oct 21 2020, 6:23 AM · Restricted Project

Oct 20 2020

avl added inline comments to D88827: [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library..
Oct 20 2020, 8:59 AM · Restricted Project

Oct 14 2020

avl updated the diff for D74169: [WIP][LLD][ELF][DebugInfo] Remove obsolete debug info..

rebased, added command-line option --gc-debuginfo-no-odr.

Oct 14 2020, 2:53 PM · debug-info, lld, Restricted Project
avl added a comment to D88827: [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library..

I like the direction this is going, I'll take more of a deep look soon, but wanted to ask: "should this be in Object rather than a separate library?" When I'd originally asked for this to be split into its own library I'd thought that it would get added into libobject.

Thoughts?

Oct 14 2020, 5:39 AM · Restricted Project

Oct 12 2020

avl added inline comments to D89216: [dsymutil] Add the ability to run the DWARF verifier on the input.
Oct 12 2020, 8:59 AM · Restricted Project
avl updated the diff for D85614: [TRE] Reland: allow TRE for non-capturing calls..

Implemented that algorithm: First, create a temporary alloca
corresponding to each byval argument. Then, copy each byval
argument to the call to its temporary alloca. Finally, copy
each byval argument to the call from the temporaries to the
memory originally allocated for the function's arguments.

Oct 12 2020, 6:19 AM · Restricted Project
avl added inline comments to D89216: [dsymutil] Add the ability to run the DWARF verifier on the input.
Oct 12 2020, 4:22 AM · Restricted Project

Oct 9 2020

avl added inline comments to D88827: [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library..
Oct 9 2020, 8:07 AM · Restricted Project

Oct 8 2020

avl added inline comments to D85614: [TRE] Reland: allow TRE for non-capturing calls..
Oct 8 2020, 2:07 PM · Restricted Project
avl updated the diff for D85614: [TRE] Reland: allow TRE for non-capturing calls..

use incoming function arguments area for storing byvalue operand of the recursive call.

Oct 8 2020, 1:59 PM · Restricted Project
avl added a comment to D88827: [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library..

1, 2 - perhaps, this can be refactored / reorganized / better documented, but it would be great to have it done before the introduction of the library.

Oct 8 2020, 5:32 AM · Restricted Project
avl added a comment to D88827: [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library..

The functions in the library header need doxygen style comments to explain the interface. Possibly these could be added in a follow-up patch.

Oct 8 2020, 12:13 AM · Restricted Project

Oct 7 2020

avl added inline comments to D85614: [TRE] Reland: allow TRE for non-capturing calls..
Oct 7 2020, 3:12 PM · Restricted Project
avl added inline comments to D85614: [TRE] Reland: allow TRE for non-capturing calls..
Oct 7 2020, 2:42 PM · Restricted Project
avl added inline comments to D85614: [TRE] Reland: allow TRE for non-capturing calls..
Oct 7 2020, 2:10 PM · Restricted Project
avl added inline comments to D85614: [TRE] Reland: allow TRE for non-capturing calls..
Oct 7 2020, 11:57 AM · Restricted Project
avl updated the summary of D85614: [TRE] Reland: allow TRE for non-capturing calls..
Oct 7 2020, 10:30 AM · Restricted Project
avl updated the summary of D85614: [TRE] Reland: allow TRE for non-capturing calls..
Oct 7 2020, 10:29 AM · Restricted Project
avl updated the diff for D85614: [TRE] Reland: allow TRE for non-capturing calls..

addressed comment. implicit copy replaced with explicit one.

Oct 7 2020, 10:26 AM · Restricted Project

Oct 6 2020

avl updated the diff for D88827: [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library..

apply clang-tidy comments.

Oct 6 2020, 12:44 PM · Restricted Project
avl added a comment to D88827: [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library..

This refactoring tries to reuse this part of the functionality:

Oct 6 2020, 7:40 AM · Restricted Project
avl updated the diff for D88827: [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library..

addressed comments.

Oct 6 2020, 7:36 AM · Restricted Project
avl committed rG7bbb65b0a431: [llvm-objcopy][NFC] fix style issues reported by clang-format. (authored by avl).
[llvm-objcopy][NFC] fix style issues reported by clang-format.
Oct 6 2020, 5:08 AM

Oct 5 2020

avl updated the summary of D88827: [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library..
Oct 5 2020, 5:58 AM · Restricted Project
avl requested review of D88827: [llvm-objcopy][NFC] Move core implementation of llvm-objcopy into separate library..
Oct 5 2020, 5:30 AM · Restricted Project

Oct 2 2020

avl committed rG0373c768c56f: [llvm-objcopy][NFC] refactor error handling. part 3. (authored by avl).
[llvm-objcopy][NFC] refactor error handling. part 3.
Oct 2 2020, 1:57 PM
avl closed D87987: [llvm-objcopy][NFC] refactor error handling. part 3..
Oct 2 2020, 1:56 PM · Restricted Project

Oct 1 2020

avl added a comment to D87987: [llvm-objcopy][NFC] refactor error handling. part 3..

I've noticed that the code tries to address 2 a bit different situations currently:

Cases that fix the unwrapOrError: like unwrapOrError(HeadersFile.program_headers()) which seems are trying to fix places related to >broken inputs which were never tested before I think.
Cases that are tested and report errors, like: error("program header with offset 0x" + Twine::utohexstr(Phdr.p_offset) + .....

I think for start we should probably focus on (B) and probably can keep unwrapOrError untouched until we convert them and add tests.
Oct 1 2020, 6:15 AM · Restricted Project
avl updated the diff for D87987: [llvm-objcopy][NFC] refactor error handling. part 3..

fixed a small typo.

Oct 1 2020, 4:22 AM · Restricted Project
avl updated the diff for D87987: [llvm-objcopy][NFC] refactor error handling. part 3..

addressed comments.

Oct 1 2020, 4:18 AM · Restricted Project

Sep 30 2020

avl added a comment to D87987: [llvm-objcopy][NFC] refactor error handling. part 3..

and the fact that there'd need to be some way of bailing out once an error is hit (the handler could be noreturn or something like that, I suppose).

Sep 30 2020, 4:05 AM · Restricted Project
avl added a comment to D87987: [llvm-objcopy][NFC] refactor error handling. part 3..

So, what about current solution in this patch to report fatal errors through Expected<>/Error in llvm-objcopy? Is it OK to do things that way? My understanding is that currently only fatal errors are reported and then no need to create handlers at the moment.

Sep 30 2020, 2:56 AM · Restricted Project

Sep 29 2020

avl added a comment to D87987: [llvm-objcopy][NFC] refactor error handling. part 3..

I was actually referring more to the style that this patch series initially looked at, which is based on something similar to what I did in the DebugLine parser, which in turn inspired my lightning talk on error handling in libraries three(?) years ago. In other words, the client would provide one or more callbacks for different degrees of severity of problems, which llvm-objcopy's code could then call when an error occurred.

Sep 29 2020, 1:41 AM · Restricted Project

Sep 28 2020

avl updated the diff for D87987: [llvm-objcopy][NFC] refactor error handling. part 3..

addressed comments.

Sep 28 2020, 4:12 AM · Restricted Project
avl added inline comments to D87987: [llvm-objcopy][NFC] refactor error handling. part 3..
Sep 28 2020, 2:45 AM · Restricted Project

Sep 27 2020

avl retitled D87987: [llvm-objcopy][NFC] refactor error handling. part 3. from [llvm-objcopy][NFC] allow to redefine error handling. to [llvm-objcopy][NFC] refactor error handling. part 3..
Sep 27 2020, 11:56 PM · Restricted Project
avl updated the diff for D87987: [llvm-objcopy][NFC] refactor error handling. part 3..

addressed comments(reworked to use Expected and Error as returning values).

Sep 27 2020, 11:55 PM · Restricted Project
avl committed rGababcd2ab491: [llvm-objcopy][NFC] refactor error handling. part 2. (authored by avl).
[llvm-objcopy][NFC] refactor error handling. part 2.
Sep 27 2020, 4:22 AM
avl closed D88213: [llvm-objcopy][NFC] refactor error handling. part 2..
Sep 27 2020, 4:22 AM · Restricted Project

Sep 25 2020

avl updated the diff for D88213: [llvm-objcopy][NFC] refactor error handling. part 2..

addressed comments(removed variable renaming, removed std::move() usage, used std::remove_if() implementation.

Sep 25 2020, 3:54 AM · Restricted Project
avl added inline comments to D88213: [llvm-objcopy][NFC] refactor error handling. part 2..
Sep 25 2020, 3:51 AM · Restricted Project
avl added inline comments to D88213: [llvm-objcopy][NFC] refactor error handling. part 2..
Sep 25 2020, 3:38 AM · Restricted Project
avl added inline comments to D88213: [llvm-objcopy][NFC] refactor error handling. part 2..
Sep 25 2020, 3:16 AM · Restricted Project