improve find-can-be-private script
add progress display and cleanup child processes Change-Id: I86cc13dee17f6d1ea2874f0ebe178426fbc82076 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124634 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -5,7 +5,6 @@ BitmapEmbossGreyFilter
|
||||
BitmapMedianFilter
|
||||
BitmapMonochromeFilter
|
||||
BitmapMosaicFilter
|
||||
BitmapPalette
|
||||
BitmapPopArtFilter
|
||||
BitmapSepiaFilter
|
||||
BitmapShadowFilter
|
||||
@@ -24,7 +23,6 @@ E3dCompoundObject
|
||||
EditUndo
|
||||
FmDesignModeChangedHint
|
||||
FocusListenerMultiplexer
|
||||
FontSelectPattern
|
||||
FontSubsetInfo
|
||||
GalleryBinaryStorageLocations
|
||||
GalleryStorageLocations
|
||||
@@ -34,6 +32,7 @@ GrBackendSurfaceMutableState
|
||||
GrBackendTexture
|
||||
GrContextThreadSafeProxy
|
||||
GrContext_Base
|
||||
GrDirectContext::DirectContextID
|
||||
GrImageContext
|
||||
GrRecordingContext
|
||||
GrVkExtensions
|
||||
@@ -51,22 +50,21 @@ MenuBarUpdateIconManager
|
||||
MetaAction
|
||||
MetaEPSAction
|
||||
MetaGradientExAction
|
||||
MetaPointAction
|
||||
MouseListenerMultiplexer
|
||||
MouseMotionListenerMultiplexer
|
||||
MyThes
|
||||
NotifyEvent
|
||||
OpenGLZone
|
||||
PaintListenerMultiplexer
|
||||
PhysicalFontFamily
|
||||
ProcessData
|
||||
Qt5SvpGraphics
|
||||
QtSvpGraphics
|
||||
SalData
|
||||
SalDisplay
|
||||
SalInfoPrinter
|
||||
SalPrinter
|
||||
SalSystem
|
||||
SbClassModuleObject
|
||||
ScChart2DataProvider
|
||||
ScFormatEntry
|
||||
ScMultiBlockUndo
|
||||
ScPaintHint
|
||||
@@ -82,7 +80,6 @@ SdOptionsLayout
|
||||
SdOptionsMisc
|
||||
SdOptionsPrint
|
||||
SdOptionsSnap
|
||||
SdXImpressDocument
|
||||
SdrCaptionEscDirItem
|
||||
SdrCaptionTypeItem
|
||||
SdrEdgeNode1HorzDistItem
|
||||
@@ -118,29 +115,20 @@ SfxStyleSheetModifiedHint
|
||||
SfxViewFrameItem
|
||||
SfxVisibilityItem
|
||||
SpinListenerMultiplexer
|
||||
SvtCompatibilityEntry
|
||||
SvxPrintItem
|
||||
SvxRsidItem
|
||||
SvxShowText
|
||||
SvxTPage
|
||||
SwAnchoredObject
|
||||
SwAuthenticator
|
||||
SwAutoCorrect
|
||||
SwBaseShell
|
||||
SwColExample
|
||||
SwConnectionListener
|
||||
SwContrastGrf
|
||||
SwDocFac
|
||||
SwDocShell::LockAllViewsGuard_Impl
|
||||
SwDrawFrameFormat
|
||||
SwDrawModeGrf
|
||||
SwDrawTextInfo
|
||||
SwEditWin
|
||||
SwEnvItem
|
||||
SwExtraRedline
|
||||
SwExtraRedlineTable
|
||||
SwFltRedline
|
||||
SwFlyFrame
|
||||
SwFormatEditInReadonly
|
||||
SwFormatEndAtTextEnd
|
||||
SwFormatFollowTextFlow
|
||||
@@ -148,38 +136,23 @@ SwFormatFootnoteAtTextEnd
|
||||
SwFormatLayoutSplit
|
||||
SwFormatNoBalancedColumns
|
||||
SwFormatRowSplit
|
||||
SwFrame
|
||||
SwGammaGrf
|
||||
SwHHCWrapper
|
||||
SwHTMLWriter
|
||||
SwHeaderAndFooterEatSpacingItem
|
||||
SwHyphWrapper
|
||||
SwLayoutFrame
|
||||
SwLuminanceGrf
|
||||
SwMirrorGrf
|
||||
SwNumRuleItem
|
||||
SwPagePreview
|
||||
SwReader
|
||||
SwReaderWriter
|
||||
SwRect
|
||||
SwRedlineExtraData
|
||||
SwRedlineExtraData_FormatColl
|
||||
SwRootFrame
|
||||
SwShellCursor
|
||||
SwSortedObjs
|
||||
SwSpellPopup
|
||||
SwTableCellInfo::Impl
|
||||
SwTableCellRedline
|
||||
SwTableRowRedline
|
||||
SwTestItem
|
||||
SwTextFrame
|
||||
SwTextShell
|
||||
SwTransferable
|
||||
SwUnoCursorHelper
|
||||
SwVisibleCursor
|
||||
SwWebDocShell
|
||||
SwWebView
|
||||
SwWriter
|
||||
SwWrtShellItem
|
||||
SwXTextRange::Impl
|
||||
SwXTextTableCursor
|
||||
@@ -235,6 +208,7 @@ covariant return thunk to ScEditWindow
|
||||
dbtools::param::ParameterWrapper
|
||||
desktop::CallbackFlushHandler
|
||||
desktop::CallbackFlushHandler::CallbackData
|
||||
desktop::CallbackFlushHandler::TimeoutIdle
|
||||
desktop::LibLODocument_Impl
|
||||
desktop::LibLibreOffice_Impl
|
||||
dp_misc::AbortChannel
|
||||
@@ -279,23 +253,17 @@ oox::ole::AxTabStripModel
|
||||
oox::ole::AxToggleButtonModel
|
||||
oox::ole::AxUserFormModel
|
||||
sc::CopyFromClipContext
|
||||
sc::DeleteRowTransformation
|
||||
sc::FindReplaceTransformation
|
||||
sc::FormulaGroupInterpreter
|
||||
sc::SwapRowsTransformation
|
||||
sd::DrawView
|
||||
sdr::SelectionController
|
||||
sdr::ViewSelection
|
||||
sdr::animation::primitiveAnimator
|
||||
sdr::contact::ObjectContactPainter
|
||||
sk_app::WindowContext
|
||||
svx::CommonStyleManager
|
||||
svx::PropertyValueProvider
|
||||
sw::AccessibilityCheck
|
||||
sw::BroadcastingModify
|
||||
sw::IndexingExport
|
||||
sw::ModelTraverser
|
||||
sw::UndoManager
|
||||
sw::UnoCursorHint
|
||||
sw::search::SearchResultLocator
|
||||
ucbhelper::ActiveDataSink
|
||||
ucbhelper::InteractionAbort
|
||||
ucbhelper::InteractionApprove
|
||||
@@ -304,6 +272,7 @@ ucbhelper::InteractionRetry
|
||||
ucbhelper::InteractionSupplyAuthentication
|
||||
utl::OInputStreamHelper
|
||||
vcl::ExtOutDevData
|
||||
vcl::ScriptRun
|
||||
vcl::filter::PDFBooleanElement
|
||||
vcl::filter::PDFCommentElement
|
||||
vcl::filter::PDFEndObjectElement
|
||||
@@ -311,6 +280,7 @@ vcl::filter::PDFEndStreamElement
|
||||
vcl::filter::PDFHexStringElement
|
||||
vcl::filter::PDFLiteralStringElement
|
||||
vcl::filter::PDFNullElement
|
||||
vcl::printer::Options
|
||||
writerperfect::DirectoryStream::Impl
|
||||
xmloff::OControlBorderHandler
|
||||
xmloff::OFontWidthHandler
|
||||
|
||||
@@ -53,6 +53,7 @@ with subprocess_find.stdout as txt:
|
||||
if line_regex.match(line2):
|
||||
sym = line2.split(" ")[2]
|
||||
exported_symbols.add(sym)
|
||||
subprocess_nm.terminate()
|
||||
# look for imported symbols
|
||||
subprocess_objdump = subprocess.Popen(b"objdump -T " + sharedlib, stdout=subprocess.PIPE, shell=True)
|
||||
with subprocess_objdump.stdout as txt2:
|
||||
@@ -65,10 +66,11 @@ with subprocess_find.stdout as txt:
|
||||
# 0000000000000000 DF *UND* 0000000000000000 _ZN16FilterConfigItem10WriteInt32ERKN3rtl8OUStringEi
|
||||
for line2_bytes in txt2:
|
||||
line2 = line2_bytes.strip().decode("utf-8")
|
||||
if not("*UND*"in line2): continue
|
||||
tokens = line2.split(" ")
|
||||
if len(tokens) < 7 or not(tokens[7].startswith("*UND*")): continue
|
||||
sym = tokens[len(tokens)-1]
|
||||
imported_symbols.add(sym)
|
||||
subprocess_objdump.terminate()
|
||||
subprocess_find.terminate()
|
||||
|
||||
# look for imported symbols in executables
|
||||
@@ -92,7 +94,10 @@ print("exported = " + str(len(exported_symbols)))
|
||||
print("imported = " + str(len(imported_symbols)))
|
||||
print("diff = " + str(len(diff)))
|
||||
|
||||
for sym in exported_symbols:
|
||||
progress = 0;
|
||||
for sym in sorted(exported_symbols):
|
||||
progress += 1
|
||||
if (progress % 128 == 0): print( str(int(progress * 100 / len(exported_symbols))) + "%")
|
||||
filtered_sym = subprocess.check_output(["c++filt", sym]).strip().decode("utf-8")
|
||||
if filtered_sym.startswith("non-virtual thunk to "): filtered_sym = filtered_sym[21:]
|
||||
elif filtered_sym.startswith("virtual thunk to "): filtered_sym = filtered_sym[17:]
|
||||
@@ -107,7 +112,10 @@ for sym in exported_symbols:
|
||||
# find standalone functions which are exported but not imported
|
||||
if not(sym in imported_symbols): unused_function_exports.add(func)
|
||||
|
||||
for sym in imported_symbols:
|
||||
progress = 0;
|
||||
for sym in sorted(imported_symbols):
|
||||
progress += 1
|
||||
if (progress % 128 == 0): print( str(int(progress * 100 / len(imported_symbols))) + "%")
|
||||
filtered_sym = subprocess.check_output(["c++filt", sym]).strip().decode("utf-8")
|
||||
if filtered_sym.startswith("non-virtual thunk to "): filtered_sym = filtered_sym[21:]
|
||||
elif filtered_sym.startswith("virtual thunk to "): filtered_sym = filtered_sym[17:]
|
||||
|
||||
@@ -212,7 +212,7 @@ class DeleteRowTransformation : public DataTransformation
|
||||
const OUString & getFindString() const;
|
||||
};
|
||||
|
||||
class SC_DLLPUBLIC SwapRowsTransformation : public DataTransformation
|
||||
class SwapRowsTransformation : public DataTransformation
|
||||
{
|
||||
SCROW mxRow, nxRow;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user