Download it now!
Bug 39446 - Bloat Removal. Removing uncallable code with callcatcher
Summary: Bloat Removal. Removing uncallable code with callcatcher
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL: http://cgit.freedesktop.org/libreoffi...
Whiteboard: target:4.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-21 08:37 UTC by Björn Michaelsen
Modified: 2013-02-27 14:41 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Michaelsen 2011-07-21 08:37:39 UTC
'''Background:''' A certain amount of code is compiled, distributed but never linked to, and cannot possibly be used in OO.o. We have a tool to identify this called 'callcatcher'. A recent run: http://people.redhat.com/caolanm/callcatcher/DEV300_m87/ shows eg. 170 un-used methods in calc alone. These need to be manually verified, to ensure that they are not called from some 'dlsym' type magic, and the code simply discarding.

'''Skills:''' building, test, simple C++ programming

'''Parts Completed:''' calc - 06/02/2011 - Alfonso Eusebio
Comment 1 Thomas Arnhold 2011-07-25 14:20:44 UTC
List is now at: http://cgit.freedesktop.org/libreoffice/bootstrap/tree/unusedcode.easy
Comment 2 Caolán McNamara 2011-11-16 03:00:19 UTC
lots of progress here by multiple people.

The list is a list of methods unused under Linux in a --enable-debug build.
What that means is that 
a) some of the methods might be used under other platforms or configurations, in which case some platform ifdefs might be called for.
b) the methods are just unused totally, which is the usual case, in which case they can go.

Some complexities arise because some are generated from macros, e.g. easy-hack bug 38831 is one example of macros that generate huge amounts of unused methods
Comment 3 Nuno J. Silva 2012-03-16 09:43:23 UTC
While reading this, took me a while to realize why was I getting an empty list. I guess that, with the repository change that happened some months ago, this is now http://cgit.freedesktop.org/libreoffice/core/tree/unusedcode.easy ?

(And maybe it's useful to add this to the URL field of the report?)
Comment 4 Caolán McNamara 2012-03-20 03:27:52 UTC
yes indeed, it moved around.

Worth noting I think is that a lot of the unused "Insert" "Delete" etc methods are from some archaic macro-based containers, so there is some overlap with bug 38832, where conversion to STL of the objects that are showing unused Insert/Delete methods kills two birds with one stone
Comment 5 Florian Reisinger 2012-05-18 09:03:57 UTC
Deteted "Easyhack" from summary
Comment 6 Caolán McNamara 2013-02-11 11:41:25 UTC
Retiring this as an easy hack, the list remains and is regularly regenerated, but non-trivial ones remain that are platform dependent, so they're not "easy" anymore. Do read the unusedcode.README.
Comment 7 Not Assigned 2013-02-27 14:41:43 UTC
Jean-Noël Rouvignac committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=875c997c7da116402509d0bd75e8c15a66a40529

fdo#39446 - Bloat Removal. Removing uncallable code with callcatcher



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.