public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: cp functions not called during testsuite execution
@ 1998-08-24 18:48 Mike Stump
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Stump @ 1998-08-24 18:48 UTC (permalink / raw)
  To: amylaar; +Cc: egcs, martin

> From: Joern Rennecke <amylaar@cygnus.co.uk>
> To: mrs@wrs.com (Mike Stump)
> Date: Tue, 25 Aug 1998 01:42:22 +0100 (BST)

> What do you do about error returns from system calls that might not
> happen for an entire generation of computers?

Right!  I didn't say I was for it, I did want to say more than my
original `No', just in case people did put it in the compiler.  I gave
them a framework that is more acceptable to me than just ripping out
things wholesale without `engineering' them out.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cp functions not called during testsuite execution
  1998-08-25 11:02     ` Joern Rennecke
@ 1998-08-25 19:31       ` Robert Lipe
  0 siblings, 0 replies; 7+ messages in thread
From: Robert Lipe @ 1998-08-25 19:31 UTC (permalink / raw)
  To: egcs; +Cc: egcs

> You have to prove that the code is dead.  E.g. , you might find a set of
> necessary preconditions for the code to be executed, and then a reason

There are a number of cxref-like substances that can help with this 
exercise.   Of course, all of them can be fooled so they still need a 
skilled person operating them.

RJL

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cp functions not called during testsuite execution
  1998-08-25  9:52   ` Martin von Loewis
@ 1998-08-25 11:02     ` Joern Rennecke
  1998-08-25 19:31       ` Robert Lipe
  0 siblings, 1 reply; 7+ messages in thread
From: Joern Rennecke @ 1998-08-25 11:02 UTC (permalink / raw)
  To: Martin von Loewis; +Cc: mrs, egcs

> > That boils down to a recipe to remove error handling code from the compiler.
> > Who would pledge that he uses the 'functionality' to detect some stupid
> > typo in his development code?
> 
> Are you saying that there is no way to remove presumably dead code
> from gcc?

There is a way, but it can't be automated (at least not with current
technology ;-) .

You have to prove that the code is dead.  E.g. , you might find a set of
necessary preconditions for the code to be executed, and then a reason
why this set o precondition is never met.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cp functions not called during testsuite execution
  1998-08-24  4:22 Mike Stump
@ 1998-08-25 11:02 ` Joern Rennecke
  1998-08-25  9:52   ` Martin von Loewis
  0 siblings, 1 reply; 7+ messages in thread
From: Joern Rennecke @ 1998-08-25 11:02 UTC (permalink / raw)
  To: Mike Stump; +Cc: egcs, martin

> Instead, put in a warning that says 'tell Martin you're using this bit
> of functionality, or risk loosing it in the next major release.' run
> it that way for a while (year), then remove them.  Put a unique number
> in each, so that you can tell quickly which reports go with which
> code.

That boils down to a recipe to remove error handling code from the compiler.
Who would pledge that he uses the 'functionality' to detect some stupid
typo in his development code?
What do you do about error returns from system calls that might not
happen for an entire generation of computers?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cp functions not called during testsuite execution
  1998-08-25 11:02 ` Joern Rennecke
@ 1998-08-25  9:52   ` Martin von Loewis
  1998-08-25 11:02     ` Joern Rennecke
  0 siblings, 1 reply; 7+ messages in thread
From: Martin von Loewis @ 1998-08-25  9:52 UTC (permalink / raw)
  To: amylaar; +Cc: mrs, egcs

> That boils down to a recipe to remove error handling code from the compiler.
> Who would pledge that he uses the 'functionality' to detect some stupid
> typo in his development code?

Are you saying that there is no way to remove presumably dead code
from gcc?

I didn't propose to mark all code not executed in the testsuite, only
lines where nobody can figure out why they ever would have been used.

> What do you do about error returns from system calls that might not
> happen for an entire generation of computers?

Hmm. I'm mainly talking about the C++ front end. The number of system
calls there is rather low.

Regards,
Martin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cp functions not called during testsuite execution
@ 1998-08-24  4:22 Mike Stump
  1998-08-25 11:02 ` Joern Rennecke
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Stump @ 1998-08-24  4:22 UTC (permalink / raw)
  To: egcs, martin

> Date: Sun, 23 Aug 1998 19:37:30 +0200
> From: Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de>

> Some of the functions are probably dead; and I'd like to remove
> them, one by one, putting assertions in the places where they have
> been called.

Uhm, no.  This is kinda like delete every line that isn't executed.
Sure you can do that, and even after doing that the compiler would run
the testsuite and pass with flying colors, the problem is when 100% or
95% of all real code stops working.

Instead, put in a warning that says 'tell Martin you're using this bit
of functionality, or risk loosing it in the next major release.' run
it that way for a while (year), then remove them.  Put a unique number
in each, so that you can tell quickly which reports go with which
code.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* cp functions not called during testsuite execution
@ 1998-08-23 18:16 Martin von Loewis
  0 siblings, 0 replies; 7+ messages in thread
From: Martin von Loewis @ 1998-08-23 18:16 UTC (permalink / raw)
  To: egcs

After running the testsuite of egcs 2.92.02 19980821 on
sparc-sun-solaris2.5.1 with -fprofile-arcs -ftest-coverage, I'm in the
process of looking at the results and completing the testsuite.

Getting the list of functions not called was mainly a matter of 'gcov
-f'. I find it still interesting, and like to share it.

Some of the functions are probably dead; and I'd like to remove them,
one by one, putting assertions in the places where they have been
called. For other functions, there are simply no test cases yet. I
feel there should be, so if you know how to create a test case that
triggers one of these functions, please write it down.

Without further ado, here's the raw results. Please note that this is
only for cp/*. I can post gcc/* results as well if desired. However,
coverage for that is much lower, since some code is needed only on
some platforms.

Any comments appreciated,
Martin

  0.00% of 17 source lines executed in function find_scoped_type
  0.00% of 48 source lines executed in function resolve_scope_to_name
  0.00% of 41 source lines executed in function add_conv_candidate
  0.00% of 2 source lines executed in function is_complete
  0.00% of 2 source lines executed in function add_template_conv_candidate
  0.00% of 13 source lines executed in function maybe_fixup_vptrs
  0.00% of 59 source lines executed in function build_class_init_list
  0.00% of 2 source lines executed in function declare_parm_level
  0.00% of 84 source lines executed in function print_binding_level
  0.00% of 8 source lines executed in function print_other_binding_stack
  0.00% of 21 source lines executed in function print_binding_stack
  0.00% of 2 source lines executed in function lookup_name_namespace_only
  0.00% of 2 source lines executed in function maybe_build_cleanup_and_delete
  0.00% of 17 source lines executed in function warn_if_unknown_interface
  0.00% of 24 source lines executed in function acceptable_java_type
  0.00% of 16 source lines executed in function check_java_method
  0.00% of 17 source lines executed in function get_sentry
  0.00% of 6 source lines executed in function cp_compiler_error
  0.00% of 5 source lines executed in function cp_sprintf
  0.00% of 10 source lines executed in function ident_fndecl
  0.00% of 2 source lines executed in function fndecl_as_string
  0.00% of 9 source lines executed in function language_as_string
  0.00% of 6 source lines executed in function assop_as_string
  0.00% of 21 source lines executed in function build_eh_type_type_ref
  0.00% of 43 source lines executed in function process_start_catch_block
  0.00% of 11 source lines executed in function fixup_result_decl
  0.00% of 23 source lines executed in function add_friends
  0.00% of 16 source lines executed in function is_aggr_typedef
  0.00% of 26 source lines executed in function build_java_class_ref
  0.00% of 11 source lines executed in function build_vbase_delete
  0.00% of 26 source lines executed in function yyprint
  0.00% of 3 source lines executed in function set_yydebug
  0.00% of 5 source lines executed in function set_typedecl_interface_info
  0.00% of 11 source lines executed in function set_vardecl_interface_info
  0.00% of 11 source lines executed in function identifier_typedecl_value
  0.00% of 16 source lines executed in function dump_time_statistics
  0.00% of 4 source lines executed in function compiler_error
  0.00% of 6 source lines executed in function my_get_run_time
  0.00% of 23 source lines executed in function dicat
  0.00% of 9 source lines executed in function is_back_referenceable_type
  0.00% of 8 source lines executed in function issue_nrepeats
  0.00% of 21 source lines executed in function check_btype
  0.00% of 6 source lines executed in function get_id_2
  0.00% of 11 source lines executed in function issue_ktype
  0.00% of 5 source lines executed in function tinst_for_decl
  0.00% of 8 source lines executed in function list_eq
  0.00% of 7 source lines executed in function overload_template_name
  0.00% of 22 source lines executed in function print_lang_decl
  0.00% of 61 source lines executed in function print_lang_type
  0.00% of 8 source lines executed in function print_lang_identifier
  0.00% of 20 source lines executed in function lang_print_xnode
  0.00% of 22 source lines executed in function extract_string
  0.00% of 19 source lines executed in function get_base_filename
  0.00% of 12 source lines executed in function open_repo_file
  0.00% of 8 source lines executed in function afgets
  0.00% of 8 source lines executed in function reopen_repo_file_for_write
  0.00% of 9 source lines executed in function my_build_string
  0.00% of 2 source lines executed in function print_search_statistics
  0.00% of 10 source lines executed in function reinit_search_statistics
  0.00% of 10 source lines executed in function dfs_check_overlap
  0.00% of 2 source lines executed in function dfs_no_overlap_yet
  0.00% of 7 source lines executed in function types_overlap_p
  0.00% of 10 source lines executed in function finish_label_address_expr
  0.00% of 2 source lines executed in function finish_declarator
  0.00% of 2 source lines executed in function build_signature_reference_type
  0.00% of 9 source lines executed in function probe_obstack
  0.00% of 8 source lines executed in function avoid_overlap
  0.00% of 8 source lines executed in function hash_chainon
  0.00% of 17 source lines executed in function debug_binfo
  0.00% of 11 source lines executed in function count_functions
  0.00% of 4 source lines executed in function is_aggr_type_2
  0.00% of 6 source lines executed in function print_lang_statistics
  0.00% of 4 source lines executed in function __eprintf
  0.00% of 4 source lines executed in function build_int_wrapper
  0.00% of 6 source lines executed in function varargs_function_p
  0.00% of 2 source lines executed in function fntype_p
  0.00% of 31 source lines executed in function common_base_type
  0.00% of 16 source lines executed in function signature_error
  0.00% of 7 source lines executed in function ack
  0.00% of 6 source lines executed in function GNU_xref_begin
  0.00% of 13 source lines executed in function GNU_xref_end
  0.00% of 20 source lines executed in function gen_assign
  0.00% of 8 source lines executed in function classname
  0.00% of 6 source lines executed in function find_file
  0.00% of 8 source lines executed in function filename
  0.00% of 12 source lines executed in function fctname
  0.00% of 5 source lines executed in function declname
  0.00% of 33 source lines executed in function simplify_type
  0.00% of 16 source lines executed in function fixname
  0.00% of 18 source lines executed in function open_xref_file


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1998-08-25 19:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-24 18:48 cp functions not called during testsuite execution Mike Stump
  -- strict thread matches above, loose matches on Subject: below --
1998-08-24  4:22 Mike Stump
1998-08-25 11:02 ` Joern Rennecke
1998-08-25  9:52   ` Martin von Loewis
1998-08-25 11:02     ` Joern Rennecke
1998-08-25 19:31       ` Robert Lipe
1998-08-23 18:16 Martin von Loewis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).