Commit Graph

7 Commits

Author SHA1 Message Date
Ian Lance Taylor
8c73afb353 Avoid some overflow cases:
* basic_blocks.h (bb_min_calls): Change to unsigned long.
	* call_graph.h (cg_tally): Change count parameter to unsigned
	long.
	* cg_arcs.h (Arc): Change count field to unsigned long.
	(arc_add): Change count parameter to unsigned long.
	* source.h (Source_File): Change ncalls field to unsigned long.
	* symtab.h (Sym): Change fields ncalls, bb_calls, and
	cg.self_calls to unsigned long.
	* Many files: Update accordingly.
1998-08-12 19:06:24 +00:00
Ian Lance Taylor
6b84886ad5 Fix some gcc -Wall warnings:
* cg_arcs.c (num_cycles): Change to unsigned int.
	(numarcs): Likewise.
	(arc_add): Change maxarcs to unsigned int.
	(cg_assemble): Change index to unsigned int.
	* cg_arcs.h (num_cycles, numarcs): Update declarations.
	* cg_print.c (cg_print): Change index to unsigned int.
	(cg_print_index): Change index, nnames, todo, i, and j to unsigned
	int.
	(cg_print_file_ordering): Change symbol_count and index2 to
	unsigned int.
	* core.c (symbol_map_count): Change to unsigned int.
	(core_create_function_syms): Change j to unsigned int.
	(core_create_line_syms): Add cast to avoid warning.
	* hist.c (hist_assign_samples): Change j to unsigned int.
	(hist_print): Change index to unsigned i nt.  Add cast to avoid
	warning.
	* sym_ids.c (parse_spec): Add casts to avoid warning.
	* symtab.c (symtab_finalize): Change j to unsigned int.
	(sym_lookup): Update printf format strings.
	* symtab.h (Sym_Table): Change len to unsigned int.
	* tahoe.c (tahoe_reladdr): Add casts to avoid warnings.
1998-03-29 04:15:29 +00:00
Ian Lance Taylor
7862d7d065 Tue Feb 3 14:25:25 1998 Brent Baccala <baccala@freesoft.org>
* symtab.c (symtab_finalize): Prefer function symbols over line
	symbols.
	(dbg_sym_lookup): Correct debugging messages.

	* gprof.c (main): --sum implies --line.

	* cg_print.c (cg_print): When doing line by line profiling, don't
	use a non-function as a main listing item.

	* call_graph.c (cg_tally): When using line by line profiling, use
 	the function symbol as the child.

	* symtab.h (NBBS): Define.
	(Sym): Add bb_addr and bb_calls fields.
	* basic_blocks.c (bb_read_rec): Save multiple basic blocks per
	symbol.
	(bb_write_blocks): Adjust for multiple basic blocks per symbol.
	(print_exec_counts): Don't check whether a symbol is the start of
	a basic block.  Print all basic blocks for a symbol.
	(annotate_with_count): Rewrite to print all basic block counts and
	to pay attention to width argument.
	(print_annotated_source): Don't check whether symbol is the start
	of a basic block.
1998-02-04 00:30:48 +00:00
Ian Lance Taylor
1eb9fa9eba Sat Mar 15 19:17:31 1997 H.J. Lu <hjl@lucon.org>
* symtab.h (find_call): Declare.
	* cg_arcs.c (cg_assemble): Don't declare find_call.
	* hist.c (scale_and_align_entries): Declare.
1997-03-16 00:18:26 +00:00
Jeff Law
64c50fc5db * gprof.c (long_options): Add "--function-ordering" and
"--file-ordering" options.
	(usage): Add new options to usage message.
	(main): Handle new options.
	* gprof.h (STYLE_FUNCTION_ORDER): Define.
	(STYLE_FILE_ORDER): Define.
	(function_mapping_file): Declare.
	* cg_arcs.c (arcs, numarcs): New globals.
	(arc_add): Put new arcs into the arc array so the function/file
	ordering code can examine them.
	* cg_arcs.h (struct arc): New field "has_been_placed".
	(arcs, numarcs): Declare new globals.
	* core.c (symbol_map, symbol_map_count): New globals.
	(read_function_mappings): New function to read in a function
	to object map file.
	(core_init): Call read_function_mappings if a function mapping
	file exists.
	(core_create_function_syms): Handle function to object file
	mappings.
	* symtab.h (struct sym): New fields "mapped", "has_been_placed",
	"nuses", "prev".
	* cg_print.c (cmp_arc_count): New function for sorting arcs.
	(cmp_fun_nuses): Likewise for functions.
	(cg_print_function_ordering): New function to print a suggested
	function ordering.
	(cg_print_file_ordering): Likewise for ordering .o files.
	(order_and_dump_functions_by_arcs): Helper function for function
	and object file ordering code.
Gprof changes for mentor vm work.
1995-12-31 06:36:30 +00:00
Ken Raeburn
12516a373c ran "indent -gnu"; have not fixed block comment style 1995-02-08 02:35:44 +00:00
Ken Raeburn
5489fcc3d9 Lots of changes from David Mosberger-Tang; see ChangeLog and NOTES for details:
Alpha support.
Long options.
New file format to support more information; backwards compatibility.
Line-level profiling, on systems where bfd_find_nearest_line works.
Selective display of data.
1995-02-07 22:34:18 +00:00