[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC
rocallahan added a comment. I agree that ideally the linker would be able to do fine-grained GC of DWARF at the granularity of individual DIEs and other data items. However, implementing that would be a huge project. Currently AFAICT `lld` does very little DWARF processing. Wholesale DWARF rewriting would expand the scope of the linker and require lots of testing against various DWARF producers and consumers. I definitely wouldn't want to implement that. Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54747/new/ https://reviews.llvm.org/D54747 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC
rocallahan added a comment. Here are some results for the rusoto test in https://github.com/rust-lang/rust/issues/56068#issue-382175735: | LLD | Binary size in bytes | | LLD 6.0.1 | 43,791,192 | | LLD 8.0.0 1cfcf404f6b23943405bc3c5bb5940b10b914624 | 43,861,056 | | LLD 8.0.0 1cfcf404f6b23943405bc3c5bb5940b10b914624 `--start-lib` | 43,844,760 | | LLD 8.0.0 1cfcf404f6b23943405bc3c5bb5940b10b914624 + this patch | 6,281,488 | | For `--start-lib` I wrapped `--start-lib`/`--end-lib` around all object files. As I expected `--start-lib` didn't make much difference. The dependencies containing debuginfo that I want to be GCed away are already packaged into static libraries before being passed to the final link. Repository: rLLD LLVM Linker CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54747/new/ https://reviews.llvm.org/D54747 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r350166 - [CommandInterpreter] Simplify PreprocessCommand. (NFCI)
Author: jdevlieghere Date: Sun Dec 30 09:56:30 2018 New Revision: 350166 URL: http://llvm.org/viewvc/llvm-project?rev=350166=rev Log: [CommandInterpreter] Simplify PreprocessCommand. (NFCI) Simplify some code in PreprocessCommand. This change improves consistency, reduces the indentation and makes the code easier to follow overall. Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=350166=350165=350166=diff == --- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original) +++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Sun Dec 30 09:56:30 2018 @@ -1455,130 +1455,140 @@ Status CommandInterpreter::PreprocessCom size_t start_backtick; size_t pos = 0; while ((start_backtick = command.find('`', pos)) != std::string::npos) { +// Stop if an error was encountered during the previous iteration. +if (error.Fail()) + break; + if (start_backtick > 0 && command[start_backtick - 1] == '\\') { // The backtick was preceded by a '\' character, remove the slash and - // don't treat the backtick as the start of an expression + // don't treat the backtick as the start of an expression. command.erase(start_backtick - 1, 1); - // No need to add one to start_backtick since we just deleted a char + // No need to add one to start_backtick since we just deleted a char. pos = start_backtick; -} else { - const size_t expr_content_start = start_backtick + 1; - const size_t end_backtick = command.find('`', expr_content_start); - if (end_backtick == std::string::npos) -return error; - else if (end_backtick == expr_content_start) { -// Empty expression (two backticks in a row) -command.erase(start_backtick, 2); - } else { -std::string expr_str(command, expr_content_start, - end_backtick - expr_content_start); + continue; +} + +const size_t expr_content_start = start_backtick + 1; +const size_t end_backtick = command.find('`', expr_content_start); + +if (end_backtick == std::string::npos) { + // Stop if there's no end backtick. + break; +} + +if (end_backtick == expr_content_start) { + // Skip over empty expression. (two backticks in a row) + command.erase(start_backtick, 2); + continue; +} + +std::string expr_str(command, expr_content_start, + end_backtick - expr_content_start); + +ExecutionContext exe_ctx(GetExecutionContext()); +Target *target = exe_ctx.GetTargetPtr(); + +// Get a dummy target to allow for calculator mode while processing +// backticks. This also helps break the infinite loop caused when target is +// null. +if (!target) + target = m_debugger.GetDummyTarget(); + +if (!target) + continue; + +ValueObjectSP expr_result_valobj_sp; + +EvaluateExpressionOptions options; +options.SetCoerceToId(false); +options.SetUnwindOnError(true); +options.SetIgnoreBreakpoints(true); +options.SetKeepInMemory(false); +options.SetTryAllThreads(true); +options.SetTimeout(llvm::None); + +ExpressionResults expr_result = +target->EvaluateExpression(expr_str.c_str(), exe_ctx.GetFramePtr(), + expr_result_valobj_sp, options); -ExecutionContext exe_ctx(GetExecutionContext()); -Target *target = exe_ctx.GetTargetPtr(); -// Get a dummy target to allow for calculator mode while processing -// backticks. This also helps break the infinite loop caused when -// target is null. -if (!target) - target = m_debugger.GetDummyTarget(); -if (target) { - ValueObjectSP expr_result_valobj_sp; - - EvaluateExpressionOptions options; - options.SetCoerceToId(false); - options.SetUnwindOnError(true); - options.SetIgnoreBreakpoints(true); - options.SetKeepInMemory(false); - options.SetTryAllThreads(true); - options.SetTimeout(llvm::None); - - ExpressionResults expr_result = target->EvaluateExpression( - expr_str.c_str(), exe_ctx.GetFramePtr(), expr_result_valobj_sp, - options); - - if (expr_result == eExpressionCompleted) { -Scalar scalar; -if (expr_result_valobj_sp) - expr_result_valobj_sp = - expr_result_valobj_sp->GetQualifiedRepresentationIfAvailable( - expr_result_valobj_sp->GetDynamicValueType(), true); -if (expr_result_valobj_sp->ResolveValue(scalar)) { - command.erase(start_backtick, end_backtick - start_backtick + 1); - StreamString value_strm; -
Re: [Lldb-commits] [lldb] r350160 - [test] Remove flakiness decorator from TestObjCDynamicSBType
No problem, thanks! On Sun, Dec 30, 2018 at 5:11 PM Jonas Devlieghere wrote: > > > > On Sun, Dec 30, 2018 at 05:33 Davide Italiano wrote: >> >> Nice, thanks! >> There is a typo in the commit message, I assume? > > > Correct, I made a typo in the PR and then mindlessly copied the name of the > test. >> >> >> >> On Sun, Dec 30, 2018 at 7:13 AM Jonas Devlieghere via lldb-commits >> wrote: >> > >> > Author: jdevlieghere >> > Date: Sat Dec 29 22:10:03 2018 >> > New Revision: 350160 >> > >> > URL: http://llvm.org/viewvc/llvm-project?rev=350160=rev >> > Log: >> > [test] Remove flakiness decorator from TestObjCDynamicSBType >> > >> > The quoted bug report (llvm.org/PR20270) was closed in 2014. >> > >> > Modified: >> > >> > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py >> > >> > Modified: >> > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py >> > URL: >> > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py?rev=350160=350159=350160=diff >> > == >> > --- >> > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py >> > (original) >> > +++ >> > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py >> > Sat Dec 29 22:10:03 2018 >> > @@ -6,7 +6,6 @@ from __future__ import print_function >> > >> > >> > import lldb >> > -from lldbsuite.test.decorators import * >> > from lldbsuite.test.lldbtest import * >> > from lldbsuite.test import lldbutil >> > >> > @@ -24,7 +23,6 @@ class ExprCommandCallStopContinueTestCas >> > '// Please test these expressions while stopped at this >> > line:') >> > self.func_line = line_number('main.cpp', '{5, "five"}') >> > >> > -@expectedFlakeyDarwin("llvm.org/pr20274") >> > def test(self): >> > """Test gathering result from interrupted function call.""" >> > self.build() >> > >> > >> > ___ >> > lldb-commits mailing list >> > lldb-commits@lists.llvm.org >> > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > > -- > Sent from my iPhone ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r350160 - [test] Remove flakiness decorator from TestObjCDynamicSBType
On Sun, Dec 30, 2018 at 05:33 Davide Italiano wrote: > Nice, thanks! > There is a typo in the commit message, I assume? > Correct, I made a typo in the PR and then mindlessly copied the name of the test. > > > On Sun, Dec 30, 2018 at 7:13 AM Jonas Devlieghere via lldb-commits > wrote: > > > > Author: jdevlieghere > > Date: Sat Dec 29 22:10:03 2018 > > New Revision: 350160 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=350160=rev > > Log: > > [test] Remove flakiness decorator from TestObjCDynamicSBType > > > > The quoted bug report (llvm.org/PR20270) was closed in 2014. > > > > Modified: > > > > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py > > > > Modified: > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py > > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py?rev=350160=350159=350160=diff > > > == > > --- > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py > (original) > > +++ > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py > Sat Dec 29 22:10:03 2018 > > @@ -6,7 +6,6 @@ from __future__ import print_function > > > > > > import lldb > > -from lldbsuite.test.decorators import * > > from lldbsuite.test.lldbtest import * > > from lldbsuite.test import lldbutil > > > > @@ -24,7 +23,6 @@ class ExprCommandCallStopContinueTestCas > > '// Please test these expressions while stopped at this > line:') > > self.func_line = line_number('main.cpp', '{5, "five"}') > > > > -@expectedFlakeyDarwin("llvm.org/pr20274") > > def test(self): > > """Test gathering result from interrupted function call.""" > > self.build() > > > > > > ___ > > lldb-commits mailing list > > lldb-commits@lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > -- Sent from my iPhone ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r350164 - [Type] Simplify operator!=. NFC.
Author: davide Date: Sun Dec 30 07:08:51 2018 New Revision: 350164 URL: http://llvm.org/viewvc/llvm-project?rev=350164=rev Log: [Type] Simplify operator!=. NFC. Modified: lldb/trunk/source/Symbol/Type.cpp Modified: lldb/trunk/source/Symbol/Type.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=350164=350163=350164=diff == --- lldb/trunk/source/Symbol/Type.cpp (original) +++ lldb/trunk/source/Symbol/Type.cpp Sun Dec 30 07:08:51 2018 @@ -867,8 +867,7 @@ bool TypeImpl::operator==(const TypeImpl } bool TypeImpl::operator!=(const TypeImpl ) const { - return m_static_type != rhs.m_static_type || - m_dynamic_type != rhs.m_dynamic_type; + return !(*this == rhs); } bool TypeImpl::IsValid() const { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r350163 - [TypeName] Simplify operator!=. NFCI.
Author: davide Date: Sun Dec 30 07:07:25 2018 New Revision: 350163 URL: http://llvm.org/viewvc/llvm-project?rev=350163=rev Log: [TypeName] Simplify operator!=. NFCI. Modified: lldb/trunk/source/Symbol/Type.cpp Modified: lldb/trunk/source/Symbol/Type.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=350163=350162=350163=diff == --- lldb/trunk/source/Symbol/Type.cpp (original) +++ lldb/trunk/source/Symbol/Type.cpp Sun Dec 30 07:07:25 2018 @@ -710,11 +710,7 @@ bool TypeAndOrName::operator==(const Typ } bool TypeAndOrName::operator!=(const TypeAndOrName ) const { - if (m_type_pair != other.m_type_pair) -return true; - if (m_type_name != other.m_type_name) -return true; - return false; + return !(*this == other); } ConstString TypeAndOrName::GetName() const { ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r350160 - [test] Remove flakiness decorator from TestObjCDynamicSBType
Nice, thanks! There is a typo in the commit message, I assume? On Sun, Dec 30, 2018 at 7:13 AM Jonas Devlieghere via lldb-commits wrote: > > Author: jdevlieghere > Date: Sat Dec 29 22:10:03 2018 > New Revision: 350160 > > URL: http://llvm.org/viewvc/llvm-project?rev=350160=rev > Log: > [test] Remove flakiness decorator from TestObjCDynamicSBType > > The quoted bug report (llvm.org/PR20270) was closed in 2014. > > Modified: > > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py > > Modified: > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py?rev=350160=350159=350160=diff > == > --- > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py > (original) > +++ > lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py > Sat Dec 29 22:10:03 2018 > @@ -6,7 +6,6 @@ from __future__ import print_function > > > import lldb > -from lldbsuite.test.decorators import * > from lldbsuite.test.lldbtest import * > from lldbsuite.test import lldbutil > > @@ -24,7 +23,6 @@ class ExprCommandCallStopContinueTestCas > '// Please test these expressions while stopped at this line:') > self.func_line = line_number('main.cpp', '{5, "five"}') > > -@expectedFlakeyDarwin("llvm.org/pr20274") > def test(self): > """Test gathering result from interrupted function call.""" > self.build() > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits