diff options
author | Andrew Cagney <cagney@redhat.com> | 1997-09-12 02:44:03 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1997-09-12 02:44:03 +0000 |
commit | 93e7a1b5b74ce4e5a030378b5f39077aed9d0912 (patch) | |
tree | 7ba8a934d602cd9dae5417f8e943cfffe4ebe87e /sim/common | |
parent | 11ac69e0139253d10771787a44adfecb9e4bef70 (diff) | |
download | gdb-93e7a1b5b74ce4e5a030378b5f39077aed9d0912.zip gdb-93e7a1b5b74ce4e5a030378b5f39077aed9d0912.tar.gz gdb-93e7a1b5b74ce4e5a030378b5f39077aed9d0912.tar.bz2 |
Add profiling support to v850*.
Diffstat (limited to 'sim/common')
-rw-r--r-- | sim/common/ChangeLog | 45 | ||||
-rw-r--r-- | sim/common/sim-events.c | 13 |
2 files changed, 55 insertions, 3 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 5598ee2..6359cca 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,48 @@ +Thu Sep 11 10:08:48 1997 Andrew Cagney <cagney@b1.cygnus.com> + + * sim-profile.c (profile_print_speed): Call + sim_events_elapsed_time instead of PROFILE_EXEC_TIME for moment. + + * sim-events.c (sim_events_elapsed_time): New function return nr + host MS consumed by the simulator. + (sim_watch_valid): Use. + + * sim-module.c (modules): Install sim_events very very early. + + * sim-profile.c (profile_print): Call profile_print_pc. + (print_bar): + (profile_pc_init): New function, set up processor for PC + profiling. + (profile_print_pc): New function, print a PC profile. + (profile_pc_event): New function, sample PC. + + * sim-profile.h (PROFILE_PC_COUNT, PROFILE_PC_START, + PROFILE_PC_END, PROFILE_PC_SHIFT, PROFILE_PC_SAMPLE_SIZE): Add to + profile struct. + + * sim-options.c (sim_print_help): Pacify GCC. + + * sim-n-core.h (sim_core_read_aligned_N, + sim_core_write_aligned_N): Add un-conditional profile call. + (sim_core_read_unaligned_N, sim_core_write_unaligned_N): Add + profile call when aligned read/write isn't used. + + * sim-base.h: Include sim-profile, sim-model after sim-core & + sim-events allow sim-core to define useful values. + + * sim-profile.c (OPTION_PROFILE_CORE): Define. + (profile_option_handler, profile_options): Add support for + --profile-core option. + (print_bar): Include when core profiling. + (profile_print_core): New function, print core profile. + + * sim-config.c (print_sim_config): Print profile status. + + * sim-profile.h (PROFILE_NEXT_IDX, PROFILE_core, + WITH_PROFILE_PC_P): Define. + (PROFILE_CORE_COUNT): Count each core-map/size separatly. + (PROFILE_COUNT_CORE): Define. + Thu Sep 11 08:44:52 1997 Andrew Cagney <cagney@b1.cygnus.com> * sim-watch.c (handle_watchpoint): Pass a char** index into the diff --git a/sim/common/sim-events.c b/sim/common/sim-events.c index 7139662..564a99d 100644 --- a/sim/common/sim-events.c +++ b/sim/common/sim-events.c @@ -343,6 +343,15 @@ sim_events_time (SIM_DESC sd) } +INLINE_SIM_EVENTS\ +(unsigned long) +sim_events_elapsed_time (SIM_DESC sd) +{ + return (sim_elapsed_time_since (STATE_EVENTS (sd)->resume_wallclock) + + STATE_EVENTS (sd)->elapsed_wallclock); +} + + STATIC_INLINE_SIM_EVENTS\ (void) update_time_from_event (SIM_DESC sd) @@ -865,9 +874,7 @@ sim_watch_valid (SIM_DESC sd, case watch_clock: /* wallclock */ { - unsigned long elapsed_time = - (sim_elapsed_time_since (STATE_EVENTS (sd)->resume_wallclock) - + STATE_EVENTS (sd)->elapsed_wallclock); + unsigned long elapsed_time = sim_events_elapsed_time (sd); return (elapsed_time >= to_do->wallclock); } |