From 2d9c0a3c720238ae2ef1337348b6a72778024961 Mon Sep 17 00:00:00 2001 From: Nicholas Ormrod Date: Fri, 12 Jul 2024 18:38:58 -0700 Subject: [PATCH] Move experimental/symbolizer/{tool,test} to debugging/symbolizer Summary: tsia Differential Revision: D59683961 fbshipit-source-id: 53bb2df85f6e1189143a57c88e0bf88fea3cd3da --- .github/scripts/bad_targets | 4 +- .../symbolizer/test/BUCK | 2 +- .../symbolizer/test/Crash.cpp | 0 .../symbolizer/test/DwarfBenchmark.cpp | 2 +- .../symbolizer/test/ElfTest.cpp | 0 .../symbolizer/test/LineReaderTest.cpp | 0 .../symbolizer/test/SignalHandlerTest.cpp | 2 +- .../symbolizer/test/SignalHandlerTest.h | 0 .../symbolizer/test/SmallSigAltStackCrash.cpp | 0 .../symbolizer/test/StackTraceBenchmark.cpp | 0 .../test/StackTraceSizeLimitTest.cpp | 0 .../symbolizer/test/StackTraceTest.cpp | 2 +- .../symbolizer/test/SymbolizedFrameTest.cpp | 0 .../symbolizer/test/SymbolizerTest.cpp | 38 +++++++++---------- .../symbolizer/test/SymbolizerTestUtils-inl.h | 2 +- .../symbolizer/test/SymbolizerTestUtils.cpp | 2 +- .../symbolizer/test/SymbolizerTestUtils.h | 2 +- .../symbolizer/test/compare-addr2line.sh | 0 .../symbolizer/test/gnu_debuglink_test.sh | 0 .../test/symbolizer_dwp_compability.sh | 0 .../test/validate_folly_symbolizer.bzl | 6 +-- .../symbolizer/tool/Addr2Line.cpp | 0 .../symbolizer/tool/BUCK | 0 .../symbolizer/tool/LibSegFault.cpp | 0 .../symbolizer/tool/libFollySegFault.so.v | 0 25 files changed, 31 insertions(+), 31 deletions(-) rename folly/{experimental => debugging}/symbolizer/test/BUCK (98%) rename folly/{experimental => debugging}/symbolizer/test/Crash.cpp (100%) rename folly/{experimental => debugging}/symbolizer/test/DwarfBenchmark.cpp (97%) rename folly/{experimental => debugging}/symbolizer/test/ElfTest.cpp (100%) rename folly/{experimental => debugging}/symbolizer/test/LineReaderTest.cpp (100%) rename folly/{experimental => debugging}/symbolizer/test/SignalHandlerTest.cpp (98%) rename folly/{experimental => debugging}/symbolizer/test/SignalHandlerTest.h (100%) rename folly/{experimental => debugging}/symbolizer/test/SmallSigAltStackCrash.cpp (100%) rename folly/{experimental => debugging}/symbolizer/test/StackTraceBenchmark.cpp (100%) rename folly/{experimental => debugging}/symbolizer/test/StackTraceSizeLimitTest.cpp (100%) rename folly/{experimental => debugging}/symbolizer/test/StackTraceTest.cpp (99%) rename folly/{experimental => debugging}/symbolizer/test/SymbolizedFrameTest.cpp (100%) rename folly/{experimental => debugging}/symbolizer/test/SymbolizerTest.cpp (92%) rename folly/{experimental => debugging}/symbolizer/test/SymbolizerTestUtils-inl.h (96%) rename folly/{experimental => debugging}/symbolizer/test/SymbolizerTestUtils.cpp (97%) rename folly/{experimental => debugging}/symbolizer/test/SymbolizerTestUtils.h (97%) rename folly/{experimental => debugging}/symbolizer/test/compare-addr2line.sh (100%) rename folly/{experimental => debugging}/symbolizer/test/gnu_debuglink_test.sh (100%) rename folly/{experimental => debugging}/symbolizer/test/symbolizer_dwp_compability.sh (100%) rename folly/{experimental => debugging}/symbolizer/test/validate_folly_symbolizer.bzl (96%) rename folly/{experimental => debugging}/symbolizer/tool/Addr2Line.cpp (100%) rename folly/{experimental => debugging}/symbolizer/tool/BUCK (100%) rename folly/{experimental => debugging}/symbolizer/tool/LibSegFault.cpp (100%) rename folly/{experimental => debugging}/symbolizer/tool/libFollySegFault.so.v (100%) diff --git a/.github/scripts/bad_targets b/.github/scripts/bad_targets index 6147b2a1cca..038a09bfc53 100644 --- a/.github/scripts/bad_targets +++ b/.github/scripts/bad_targets @@ -5,6 +5,8 @@ root//folly/debugging/exception_tracer:exception_tracer root//folly/debugging/exception_tracer:exception_tracer_callbacks root//folly/debugging/exception_tracer:smart_exception_stack_trace_hooks root//folly/debugging/exception_tracer:smart_exception_tracer +root//folly/debugging/symbolizer/tool:folly-addr2line +root//folly/debugging/symbolizer/tool:libFollySegFault.so root//folly/docs/examples/folly:baton_demo root//folly/docs/examples/folly:cancellation_callback_demo root//folly/docs/examples/folly:cancellation_source_demo @@ -37,8 +39,6 @@ root//folly/docs/examples/folly/hash:hash_demo root//folly/docs/examples/folly/io:i_o_buf_demo root//folly/experimental/io:async_io root//folly/experimental/io:simple_async_io -root//folly/experimental/symbolizer/tool:folly-addr2line -root//folly/experimental/symbolizer/tool:libFollySegFault.so root//folly/logging/example:example root//folly/python:executor_lib root//folly/python:fibers_lib diff --git a/folly/experimental/symbolizer/test/BUCK b/folly/debugging/symbolizer/test/BUCK similarity index 98% rename from folly/experimental/symbolizer/test/BUCK rename to folly/debugging/symbolizer/test/BUCK index ade42dddcb9..e3cb422df3f 100644 --- a/folly/experimental/symbolizer/test/BUCK +++ b/folly/debugging/symbolizer/test/BUCK @@ -98,7 +98,7 @@ custom_unittest( # custom_unittest( # name = "gnu_debuglink_test_small_sigaltstack", # command = [ -# "folly/experimental/symbolizer/test/gnu_debuglink_test.sh", +# "folly/debugging/symbolizer/test/gnu_debuglink_test.sh", # "$(location :small_sigaltstack_crash)", # ], # type = "json", diff --git a/folly/experimental/symbolizer/test/Crash.cpp b/folly/debugging/symbolizer/test/Crash.cpp similarity index 100% rename from folly/experimental/symbolizer/test/Crash.cpp rename to folly/debugging/symbolizer/test/Crash.cpp diff --git a/folly/experimental/symbolizer/test/DwarfBenchmark.cpp b/folly/debugging/symbolizer/test/DwarfBenchmark.cpp similarity index 97% rename from folly/experimental/symbolizer/test/DwarfBenchmark.cpp rename to folly/debugging/symbolizer/test/DwarfBenchmark.cpp index 03b11571047..4e4d9eb6399 100644 --- a/folly/experimental/symbolizer/test/DwarfBenchmark.cpp +++ b/folly/debugging/symbolizer/test/DwarfBenchmark.cpp @@ -16,10 +16,10 @@ #include #include +#include #include #include #include -#include #include #if FOLLY_HAVE_ELF && FOLLY_HAVE_DWARF diff --git a/folly/experimental/symbolizer/test/ElfTest.cpp b/folly/debugging/symbolizer/test/ElfTest.cpp similarity index 100% rename from folly/experimental/symbolizer/test/ElfTest.cpp rename to folly/debugging/symbolizer/test/ElfTest.cpp diff --git a/folly/experimental/symbolizer/test/LineReaderTest.cpp b/folly/debugging/symbolizer/test/LineReaderTest.cpp similarity index 100% rename from folly/experimental/symbolizer/test/LineReaderTest.cpp rename to folly/debugging/symbolizer/test/LineReaderTest.cpp diff --git a/folly/experimental/symbolizer/test/SignalHandlerTest.cpp b/folly/debugging/symbolizer/test/SignalHandlerTest.cpp similarity index 98% rename from folly/experimental/symbolizer/test/SignalHandlerTest.cpp rename to folly/debugging/symbolizer/test/SignalHandlerTest.cpp index 5a37e0dcb84..a3b70ada336 100644 --- a/folly/experimental/symbolizer/test/SignalHandlerTest.cpp +++ b/folly/debugging/symbolizer/test/SignalHandlerTest.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include +#include #include diff --git a/folly/experimental/symbolizer/test/SignalHandlerTest.h b/folly/debugging/symbolizer/test/SignalHandlerTest.h similarity index 100% rename from folly/experimental/symbolizer/test/SignalHandlerTest.h rename to folly/debugging/symbolizer/test/SignalHandlerTest.h diff --git a/folly/experimental/symbolizer/test/SmallSigAltStackCrash.cpp b/folly/debugging/symbolizer/test/SmallSigAltStackCrash.cpp similarity index 100% rename from folly/experimental/symbolizer/test/SmallSigAltStackCrash.cpp rename to folly/debugging/symbolizer/test/SmallSigAltStackCrash.cpp diff --git a/folly/experimental/symbolizer/test/StackTraceBenchmark.cpp b/folly/debugging/symbolizer/test/StackTraceBenchmark.cpp similarity index 100% rename from folly/experimental/symbolizer/test/StackTraceBenchmark.cpp rename to folly/debugging/symbolizer/test/StackTraceBenchmark.cpp diff --git a/folly/experimental/symbolizer/test/StackTraceSizeLimitTest.cpp b/folly/debugging/symbolizer/test/StackTraceSizeLimitTest.cpp similarity index 100% rename from folly/experimental/symbolizer/test/StackTraceSizeLimitTest.cpp rename to folly/debugging/symbolizer/test/StackTraceSizeLimitTest.cpp diff --git a/folly/experimental/symbolizer/test/StackTraceTest.cpp b/folly/debugging/symbolizer/test/StackTraceTest.cpp similarity index 99% rename from folly/experimental/symbolizer/test/StackTraceTest.cpp rename to folly/debugging/symbolizer/test/StackTraceTest.cpp index 170ec2627c8..81141506d82 100644 --- a/folly/experimental/symbolizer/test/StackTraceTest.cpp +++ b/folly/debugging/symbolizer/test/StackTraceTest.cpp @@ -230,7 +230,7 @@ TEST(StackTraceTest, TerseFileAndLineStackTracePrinterOutput) { printer.println(addresses, 0); // Match a sequence of file+line results that should appear as: - // ./folly/experimental/symbolizer/test/StackTraceTest.cpp:202 + // ./folly/debugging/symbolizer/test/StackTraceTest.cpp:202 // or: // (unknown) boost::regex regex("((([^:]*:[0-9]*)|(\\(unknown\\)))\n)+"); diff --git a/folly/experimental/symbolizer/test/SymbolizedFrameTest.cpp b/folly/debugging/symbolizer/test/SymbolizedFrameTest.cpp similarity index 100% rename from folly/experimental/symbolizer/test/SymbolizedFrameTest.cpp rename to folly/debugging/symbolizer/test/SymbolizedFrameTest.cpp diff --git a/folly/experimental/symbolizer/test/SymbolizerTest.cpp b/folly/debugging/symbolizer/test/SymbolizerTest.cpp similarity index 92% rename from folly/experimental/symbolizer/test/SymbolizerTest.cpp rename to folly/debugging/symbolizer/test/SymbolizerTest.cpp index 78c97891f74..1ea4f20c980 100644 --- a/folly/experimental/symbolizer/test/SymbolizerTest.cpp +++ b/folly/debugging/symbolizer/test/SymbolizerTest.cpp @@ -25,10 +25,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -267,14 +267,14 @@ TEST(SymbolizerTest, InlineFunctionBasic) { frames.frames[4], "inlineA_lfind", "folly::symbolizer::test::inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h", + "folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h", kLineno_lfind); expectFrameEq( frames.frames[5], "inlineB_inlineA_lfind", "folly::symbolizer::test::inlineB_inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h", + "folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h", kLineno_inlineA_lfind); FrameArray<100> frames2; @@ -314,13 +314,13 @@ TEST(SymbolizerTest, InlineFunctionWithoutEnoughFrames) { limitedFrames[0], "inlineB_inlineA_lfind", "folly::symbolizer::test::inlineB_inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h", + "folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h", kLineno_inlineA_lfind); expectFrameEq( limitedFrames[1], "call_B_A_lfind", "folly::symbolizer::test::call_B_A_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTest.cpp", + "folly/debugging/symbolizer/test/SymbolizerTest.cpp", kLineno_inlineB_inlineA_lfind); } @@ -340,21 +340,21 @@ TEST(SymbolizerTest, InlineFunctionInLexicalBlock) { frames.frames[4], "inlineA_lfind", "folly::symbolizer::test::inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h", + "folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h", kLineno_lfind); expectFrameEq( frames.frames[5], "inlineB_inlineA_lfind", "folly::symbolizer::test::inlineB_inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h", + "folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h", kLineno_inlineA_lfind); expectFrameEq( frames.frames[6], "lexicalBlock_inlineB_inlineA_lfind", "folly::symbolizer::test::lexicalBlock_inlineB_inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils.cpp", + "folly/debugging/symbolizer/test/SymbolizerTestUtils.cpp", kLineno_inlineB_inlineA_lfind); printFrames(frames); @@ -377,7 +377,7 @@ TEST(SymbolizerTest, InlineFunctionInDifferentCompilationUnit) { frames.frames[5], "inlineLTO_inlineA_lfind", "folly::symbolizer::test::inlineLTO_inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils.cpp", + "folly/debugging/symbolizer/test/SymbolizerTestUtils.cpp", kLineno_inlineA_lfind); } @@ -397,14 +397,14 @@ TEST(SymbolizerTest, InlineClassMemberFunctionSameFile) { frames.frames[4], "inlineA_lfind", "folly::symbolizer::test::inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h", + "folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h", kLineno_lfind); expectFrameEq( frames.frames[5], "memberInline_inlineA_lfind", "folly::symbolizer::test::ClassSameFile::memberInline_inlineA_lfind() const", - "folly/experimental/symbolizer/test/SymbolizerTestUtils.cpp", + "folly/debugging/symbolizer/test/SymbolizerTestUtils.cpp", kLineno_inlineA_lfind); } @@ -424,14 +424,14 @@ TEST(SymbolizerTest, StaticInlineClassMemberFunctionSameFile) { frames.frames[4], "inlineA_lfind", "folly::symbolizer::test::inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h", + "folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h", kLineno_lfind); expectFrameEq( frames.frames[5], "staticMemberInline_inlineA_lfind", "folly::symbolizer::test::ClassSameFile::staticMemberInline_inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils.cpp", + "folly/debugging/symbolizer/test/SymbolizerTestUtils.cpp", kLineno_inlineA_lfind); } @@ -451,14 +451,14 @@ TEST(SymbolizerTest, InlineClassMemberFunctionInDifferentFile) { frames.frames[4], "inlineA_lfind", "folly::symbolizer::test::inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h", + "folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h", kLineno_lfind); expectFrameEq( frames.frames[5], "memberInline_inlineA_lfind", "folly::symbolizer::test::ClassDifferentFile::memberInline_inlineA_lfind() const", - "folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h", + "folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h", kLineno_inlineA_lfind); } @@ -478,14 +478,14 @@ TEST(SymbolizerTest, StaticInlineClassMemberFunctionInDifferentFile) { frames.frames[4], "inlineA_lfind", "folly::symbolizer::test::inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h", + "folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h", kLineno_lfind); expectFrameEq( frames.frames[5], "staticMemberInline_inlineA_lfind", "folly::symbolizer::test::ClassDifferentFile::staticMemberInline_inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h", + "folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h", kLineno_inlineA_lfind); } @@ -528,14 +528,14 @@ TEST(SymbolizerTest, InlineFunctionWithCache) { frames.frames[4], "inlineA_lfind", "folly::symbolizer::test::inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h", + "folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h", kLineno_lfind); expectFrameEq( frames.frames[5], "inlineB_inlineA_lfind", "folly::symbolizer::test::inlineB_inlineA_lfind()", - "folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h", + "folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h", kLineno_inlineA_lfind); FrameArray<100> frames2; diff --git a/folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h b/folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h similarity index 96% rename from folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h rename to folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h index dfc67d334d1..18ef2bb61bf 100644 --- a/folly/experimental/symbolizer/test/SymbolizerTestUtils-inl.h +++ b/folly/debugging/symbolizer/test/SymbolizerTestUtils-inl.h @@ -18,7 +18,7 @@ #pragma once -#include +#include extern "C" { // Fwd declare instead of #include to minimize generated DWARF. diff --git a/folly/experimental/symbolizer/test/SymbolizerTestUtils.cpp b/folly/debugging/symbolizer/test/SymbolizerTestUtils.cpp similarity index 97% rename from folly/experimental/symbolizer/test/SymbolizerTestUtils.cpp rename to folly/debugging/symbolizer/test/SymbolizerTestUtils.cpp index aecf8555eb4..082d6e5ac14 100644 --- a/folly/experimental/symbolizer/test/SymbolizerTestUtils.cpp +++ b/folly/debugging/symbolizer/test/SymbolizerTestUtils.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include +#include // NOTE: To simplify generated DWARF keep #includes to a minimum. diff --git a/folly/experimental/symbolizer/test/SymbolizerTestUtils.h b/folly/debugging/symbolizer/test/SymbolizerTestUtils.h similarity index 97% rename from folly/experimental/symbolizer/test/SymbolizerTestUtils.h rename to folly/debugging/symbolizer/test/SymbolizerTestUtils.h index aed79b563f7..fbb64a4507a 100644 --- a/folly/experimental/symbolizer/test/SymbolizerTestUtils.h +++ b/folly/debugging/symbolizer/test/SymbolizerTestUtils.h @@ -66,4 +66,4 @@ class ClassDifferentFile { } // namespace symbolizer } // namespace folly -#include +#include diff --git a/folly/experimental/symbolizer/test/compare-addr2line.sh b/folly/debugging/symbolizer/test/compare-addr2line.sh similarity index 100% rename from folly/experimental/symbolizer/test/compare-addr2line.sh rename to folly/debugging/symbolizer/test/compare-addr2line.sh diff --git a/folly/experimental/symbolizer/test/gnu_debuglink_test.sh b/folly/debugging/symbolizer/test/gnu_debuglink_test.sh similarity index 100% rename from folly/experimental/symbolizer/test/gnu_debuglink_test.sh rename to folly/debugging/symbolizer/test/gnu_debuglink_test.sh diff --git a/folly/experimental/symbolizer/test/symbolizer_dwp_compability.sh b/folly/debugging/symbolizer/test/symbolizer_dwp_compability.sh similarity index 100% rename from folly/experimental/symbolizer/test/symbolizer_dwp_compability.sh rename to folly/debugging/symbolizer/test/symbolizer_dwp_compability.sh diff --git a/folly/experimental/symbolizer/test/validate_folly_symbolizer.bzl b/folly/debugging/symbolizer/test/validate_folly_symbolizer.bzl similarity index 96% rename from folly/experimental/symbolizer/test/validate_folly_symbolizer.bzl rename to folly/debugging/symbolizer/test/validate_folly_symbolizer.bzl index 923149a50c7..93e4430df42 100644 --- a/folly/experimental/symbolizer/test/validate_folly_symbolizer.bzl +++ b/folly/debugging/symbolizer/test/validate_folly_symbolizer.bzl @@ -105,8 +105,8 @@ def validate_folly_symbolizer(name, binary): custom_unittest( name = name, command = [ - "$(exe //folly/experimental/symbolizer/test:compare-addr2line.sh)", - "$(location //folly/experimental/symbolizer/tool:folly-addr2line)", + "$(exe //folly/debugging/symbolizer/test:compare-addr2line.sh)", + "$(location //folly/debugging/symbolizer/tool:folly-addr2line)", "$(location //third-party-buck/platform010/build/llvm-fb/15:bin/llvm-addr2line)", "$(location {})".format(binary), ], @@ -121,7 +121,7 @@ def validate_symbolizer_dwp(name, binary): custom_unittest( name = name, command = [ - "$(exe //folly/experimental/symbolizer/test:symbolizer_dwp_compability.sh)", + "$(exe //folly/debugging/symbolizer/test:symbolizer_dwp_compability.sh)", "$(location {})".format(binary), "$(location {}[dwp])".format(binary), config.get_build_mode(), diff --git a/folly/experimental/symbolizer/tool/Addr2Line.cpp b/folly/debugging/symbolizer/tool/Addr2Line.cpp similarity index 100% rename from folly/experimental/symbolizer/tool/Addr2Line.cpp rename to folly/debugging/symbolizer/tool/Addr2Line.cpp diff --git a/folly/experimental/symbolizer/tool/BUCK b/folly/debugging/symbolizer/tool/BUCK similarity index 100% rename from folly/experimental/symbolizer/tool/BUCK rename to folly/debugging/symbolizer/tool/BUCK diff --git a/folly/experimental/symbolizer/tool/LibSegFault.cpp b/folly/debugging/symbolizer/tool/LibSegFault.cpp similarity index 100% rename from folly/experimental/symbolizer/tool/LibSegFault.cpp rename to folly/debugging/symbolizer/tool/LibSegFault.cpp diff --git a/folly/experimental/symbolizer/tool/libFollySegFault.so.v b/folly/debugging/symbolizer/tool/libFollySegFault.so.v similarity index 100% rename from folly/experimental/symbolizer/tool/libFollySegFault.so.v rename to folly/debugging/symbolizer/tool/libFollySegFault.so.v