public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  mmetzger/btrace: reverse-20080717-branchpoint-13963-g5dd7aa4
@ 2013-02-27 20:59 tromey
  0 siblings, 0 replies; only message in thread
From: tromey @ 2013-02-27 20:59 UTC (permalink / raw)
  To: archer-commits

The branch, mmetzger/btrace has been created
        at  5dd7aa460b03c158b938fa76ff6c83927d597bd8 (commit)

- Log -----------------------------------------------------------------
commit 5dd7aa460b03c158b938fa76ff6c83927d597bd8
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Thu Feb 21 14:39:03 2013 +0100

    archer: update
    
    Add kernel check before cpuid check.
    Incorporate feedback on command naming.
    Incorporate feedback on record renaming.
    Drop the "record list" command.
    
    Change-Id: Ife0675a1e30e91c1b28abbdc9b52f05ce6709caf
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>

commit 25be2d9660d4357cf0d08c52fd96f8df29d389b0
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Wed Feb 13 08:43:47 2013 +0100

    record-btrace, disas: omit pc prefix
    
    Add a disassembly flag to omit the pc prefix and use it in the "record
    disassembly" command of record-btrace.
    
    The pc prefix would appear multiple times in the branch trace disassembly,
    which is more confusing than helpful.
    
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
    
    	* record-btrace.c (disas_itrace): Omit the pc prefix in the branch
    	trace disassembly.
    	* disasm.c (dump_insns): Omit the pc prefix, if requested.
    	* disasm.h (DISASSEMBLY_OMIT_PC): New.
    
    Change-Id: I5c38256cc742ad9d6482ecc4d8800ab016c6f11b

commit 9bd06db6df3084f844955c0b1c839bfad0abd9b8
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Thu Jan 31 08:53:33 2013 +0100

    btrace: add record-btrace target
    
    Add a target for branch tracing.
    
    I'm not quite sure when to use ui_out_~ functions and when to use
    print_funfiltered.  I tried to copy what others are doing, but I'm
    not sure whether I got it right.
    
    For the "record backtrace" command, I assume that symbols can be compared
    by comparing their pointers.  For comparing files, I use
    compare_filenames_for_search.  I'm not sure whether this is the appropriate
    function to use in this context.
    
    Signed-off-by: Markus Metzger  <markus.t.metzger@intel.com>
    
    	* Makefile.in (SFILES): Add record-btrace.c
    	(COMMON_OBS): Add record-btrace.o
    	* record-btrace.c: New.
    	* btrace.h (struct btrace_thread_info) <itrace>: New field.
    	(struct btrace_thread_info) <begin>: New field.
    	(struct btrace_thread_info) <end>: New field.
    	* common/btrace-common.h (btrace_inst): New struct.
    	(btrace_inst_s): New typedef.
    
    Change-Id: I6398cad67cd7de80f09173a601bc00d77fe8809f

commit 86c07aaddf5f8e16baf0674c58df9218a6754706
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Fri Feb 15 11:30:12 2013 +0100

    record: allow +/- when specifying an instruction range
    
    When specifying a range of instructions in "record disassemble", "record"
    backtrace", and "record list", allow the second argument to be preceded by '+'
    or '-'.  In this case, it specifies the distance from the first argument.
    
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
    
    	* record.c (get_insn_range): Accept '+' and '-'.
    	(_initialize_record): Update help texts for "record disassemble",
    	"record backtrace", and "record list".
    
    Change-Id: Ifeeca384007dfe7b9f3c1b3f3b053e4991e95acf

commit 204dbf91e3accdb741a90d00ed0833bb41457210
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Wed Feb 13 10:12:31 2013 +0100

    record: add "record list" command
    
    Add a "record list" command to print a source listing of the recorded execution
    log.
    
    The command supports iterating over the execution log similar to the "list"
    command.
    
    This is useful for getting a quick overview of the recorded execution trace
    without having to reverse-step.
    
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
    
    	* target.c (target_list_record, target_list_record_range): New.
    	* target.h (target_ops) <to_list_record,
    	to_list_record_range>: New fields.
    	(target_disas_record, target_disas_record_range): New declaration.
    	* record.c (get_list_modifiers, cmd_record_list): New.
    	(record_list_size): New.
    	(_initialize_record): Add the "record list" command.
    	Add "set/show record list-size" commands.
    
    Change-Id: Idfc5a37f2a38b38dfdd0c0d3272cad426f3868f3

commit 8a517642fcad89f7673aa65031cc099fbaee1ab8
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Wed Feb 13 09:52:36 2013 +0100

    record: add "record backtrace" command
    
    Add a "record backtrace" command to print a backtrace of recorded functions.
    
    The command supports iterating over the execution log similar to the "list"
    command.
    
    This command provides a quick high-level overview over the recorded execution
    log without having to reverse-step.
    
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
    
    	* target.c (target_backtrace_record): New.
    	(target_backtrace_record_range): New.
    	* target.h (target_ops) <to_backtrace_record,
    	to_backtrace_record_range>: New fields.
    	(target_disas_record, target_disas_record_range): New declaration.
    	* record.c (get_insn_range, get_backtrace_modifiers,
    	cmd_record_backtrace, record_backtrace_size): New.
    	(_initialize_record): Add the "record backtrace" command.
    	Add an alias "record bt" to it. Add "set/show record
    	backtrace-size" commands.
    	* record.h (record_print_flag): New.
    
    Change-Id: Icf16459162a88b0841902454b78d107c3cd279eb

commit 198f9c336b648c1f07f92d20e0827aee7c2872a5
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Wed Feb 13 14:53:11 2013 +0100

    record disas: omit function names by default
    
    Omit function names in the disassembly of the "record disassemble" command
    unless the "/f" modifier is specified.
    
    This helps align the disassembly output across functions.  The branch
    destination is already obvious from the instruction order.
    
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
    
    	* record.c (get_disas_modifiers): Set DISASSEMBLY_OMIT_FNAME
    	unless /f is given.
    	(_initialize_record): Update the "record disassemble" help text.
    
    Change-Id: Id2446925018b6a385255fea67378573e820e76af

commit 976c314aaf00f2f419657165cd1af4de494d4ec2
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Fri Feb 1 10:27:04 2013 +0100

    record: add "record disassemble" command
    
    Add a command to provide a disassembly of the execution trace log.
    
    Approved by Jan Kratochvil.
    
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
    
    	* target.h (target_ops): Add to_disas_record and
    	to_disas_record_range fields.
    	(target_disas_record): New.
    	(target_disas_record_range): New.
    	* target.c (target_disas_record): New.
    	(target_disas_record_range): New.
    	* record.c: Include cli/cli-utils.h, disasm.h, ctype.h.
    	(record_disas_size): New.
    	(get_insn_number): New.
    	(get_disas_modifiers): New.
    	(cmd_record_disas): New.
    	(_initialize_record): Add "set/show record disas-size" command.
    	Add "record disassemble" command.
    
    Change-Id: I64d52abba191ad14e2a4df790650d07202825a14

commit 9806aa1576781a4d9b2b6e291c8a0538419cd303
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Thu Feb 7 15:07:40 2013 +0100

    record: default target methods.
    
    Provide default target methods for record targets that are likely to be shared
    between different record targets.
    
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
    
    	* record.h (record_disconnect): New.
    	(record_detach): New.
    	(record_mourn_inferior): New.
    	(record_kill): New.
    	* record-full.c (record_disconnect, record_detach,
    	record_mourn_inferior, record_kill): Move to...
    	* record.c: ...here.
    	(DEBUG): New.
    	(record_unpush): New.
    	(cmd_record_stop): Use record_unpush.
    	(record_disconnect, record_detach, record_mourn_inferior,
    	record_kill): Use record_unpush and DEBUG.
    
    Change-Id: I1ba6f18301dbc63eb2bd8f059b5aff51e01c8d6b

commit 186d1211411391f602a8e5774bdd402a69b94d72
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Tue Feb 12 09:58:47 2013 +0100

    record-full.h: rename record_ into record_full_
    
    Rename record_ prefixes in record-full.h into record_full_.
    
    I ran the gdb.reverse suite on 64bit IA gnu/linux - no regressions.
    
    The changelog for this renaming will be huge. Is there a way to abbreviate or
    auto-generate it?
    
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
    Change-Id: I0c690de416e0b77c0dbcd11ba95eee77029466e9

commit dfb79bd0e88cc693ac526ee9109debbb771a844e
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Tue Feb 12 09:35:04 2013 +0100

    record-full.c: rename record_ in record_full_.
    
    Rename record_ prefixes in record-full.c into record_full_.
    
    I ran the gdb.reverse suite on 64bit IA gnu/linux - no regressions.
    
    The changelog for this renaming will be huge. Is there a way to abbreviate or
    auto-generate it?
    
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
    Change-Id: Id1393696ac9b918f96656d843143f48cebbd6e4b

commit 35daa5fa3c2e8b4a51f7d63f84a572d3ab973f75
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Thu Jan 31 14:33:45 2013 +0100

    record: make it build again
    
    Complete the split of record into record.c and record-full.c
    
    I ran the gdb.reverse suite on 64bit IA gnu/linux - no regressions.
    
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
    
    	* target.h (target_ops): Add new fields to_info_record,
    	to_save_record, to_delete_record, to_record_is_replaying,
    	to_goto_record_begin, to_goto_record_end, to_goto_record.
    	(target_info_record): New.
    	(target_save_record): New.
    	(target_supports_delete_record): New.
    	(target_delete_record): New.
    	(target_record_is_replaying): New.
    	(target_goto_record_begin): New.
    	(target_goto_record_end): New.
    	(target_goto_record): New.
    	* target.c (target_info_record): New.
    	(target_save_record): New.
    	(target_supports_delete_record): New.
    	(target_delete_record): New.
    	(target_record_is_replaying): New.
    	(target_goto_record_begin): New.
    	(target_goto_record_end): New.
    	(target_goto_record): New.
    	* record.h: Declare struct cmd_list_element.
    	(record_cmdlist): New declaration.
    	(set_record_cmdlist): New declaration.
    	(show_record_cmdlist): New declaration.
    	(info_record_cmdlist): New declaration.
    	(cmd_record_goto): New declaration.
    	* record.c: Remove unnecessary includes.
    	Include inferior.h.
    	(cmd_record_goto): Remove declaration.
    	(record_cmdlist): Now extern. Initialize.
    	(set_record_cmdlist): Now extern. Initialize.
    	(show_record_cmdlist): Now extern. Initialize.
    	(info_record_cmdlist): Now extern. Initialize.
    	(find_record_target): New.
    	(require_record_target): New.
    	(cmd_record_start): Update.
    	(cmd_record_delete): Remove target-specific code.
    	Call target_delete_record.
    	(cmd_record_stop): Unpush any record target.
    	(set_record_insn_max_num): Move to record-full.c
    	(set_record_command): Add comment.
    	(show_record_command): Add comment.
    	(info_record_command): Update comment.
    	Remove target-specific code.
    	Call the record target's to_info_record.
    	(cmd_record_start): New.
    	(cmd_record_goto): Now extern.
    	Remove target-specific code.
    	Call target_goto_begin,  target_goto_end, or target_goto.
    	(_initialize_record): Move record target ops initialization to
    	record-full.c.
    	Change "record" command help text.
    	Move "record restore", "record set", and "record show" commands to
    	record-full.c.
    	* Makefile.in (SFILES): Add record-full.c.
    	(HFILES_NO_SRCDIR): Add record-full.h.
    	(COMMON_OBS): Add record-full.o.
    	* amd64-linux-tdep.c: Include record-full.h instead of record.h.
    	* arm-tdep.c: Include record-full.h.
    	* i386-linux-tdep.c: Include record-full.h instead of record.h.
    	* i386-tdep.c: Include record-full.h.
    	* infrun.c: Include record-full.h.
    	* linux-record.c: Include record-full.h.
    	* moxie-tdep.c: Include record-full.h.
    	* record-full.c: Include record-full.h.
    	Change module comment.
    	(set_record_full_cmdlist): New.
    	(show_record_full_cmdlist): New.
    	(record_full_cmdlist): New.
    	(record_goto_insn): New declaration.
    	(record_save): New declaration.
    	(record_check_insn_num): Change query string.
    	(record_info): New.
    	(record_delete): New.
    	(record_is_replaying): New.
    	(record_goto_entry): New.
    	(record_goto_begin): New.
    	(record_goto_end): New.
    	(record_goto): New.
    	(init_record_ops): Update.
    	(init_record_core_ops): Update.
    	(cmd_record_save): Rename to record_save. Remove target and arg checks.
    	(cmd_record_start): New.
    	(set_record_insn_max_num): Moved from record.c
    	(set_record_full_command): New.
    	(show_record_full_command): New.
    	(_initialize_record_full): New.
    
    Change-Id: Iadf27b812f0f36921bd74d9d9bf36f7301b60f27

commit 5eff8d6f18ec211552c95d0635ad61447145f43f
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Wed Feb 6 14:16:02 2013 +0100

    record: split record
    
    Split record.h into record.h and record-full.h.
    Split record.c into record.c and record-full.c.
    
    The split leaves the command part in record.c and moves the target part into
    record-full.c.
    
    The result does not build!
    This patch will be merged with the next patch before committing.
    
    Approved by Jan Kratochvil.
    
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
    
    	* record.h: Split into this and ...
    	* record-full.h: ... this.
    	* record.c: Split into this and ...
    	* record-full.c: ... this.
    
    Change-Id: I0a55ddf0311406a1d977c1c375a04fdc63257a07

commit 4f927526673402d7a7bf763db245f5cb4009152f
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Mon Feb 4 14:36:53 2013 +0100

    target: add add_deprecated_target_alias
    
    Add a new function to target.h to add an alias command for a target and mark it
    deprecated.  This is useful when renaming targets.
    
    Approved by Jan Kratochvil.
    
    Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
    
    	* target.h (add_deprecated_target_alias): New.
    	* target.c (add_deprecated_target_alias): New.
    
    Change-Id: I6b679682475c9aa3bae3be300f79c08ce9bd3aee

commit 00ec02080ada82d56f960e639811a52a22d6de2e
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Thu Dec 6 11:06:14 2012 +0100

    btrace, x86: disable on some processors
    
    LBR, BTM, or BTS records may have incorrect branch "from" information afer an
    EIST transition, T-states, C1E, or Adaptive Thermal Throttling (AAJ122).
    
    This results in sporadic test fails. Disable btrace on those processors.
    
    I still need to implement the feature check before checking cpuid requested by
    Mark Kettenis.
    
    Signed-off-by: Markus Metzger  <markus.t.metzger@intel.com>
    
    	* common/linux-btrace.c (linux_supports_btrace): Add cpuid check.
    	(intel_supports_btrace): New function.
    
    Change-Id: Ic79f4fb1b9714e91c4f7c1ec935a1123a99af190

commit 830c24801bb33775c5522b92f60df14a0eb5e684
Author: Barkha Ahuja <barkha.ahuja@intel.com>
Date:   Wed Feb 8 14:54:43 2012 +0100

    test, btrace: more branch tracing tests
    
    Non-stop tests are failing with gdbserver and are thus skipped.
    
    Signed-off-by: Barkha Ahuja  <barkha.ahuja@intel.com>
    
    testsuite/
     	* gdb.btrace/a.S: New file
    	* gdb.btrace/allthreads_trace.exp: New file
    	* gdb.btrace/b.S: New file
    	* gdb.btrace/decrement.exp: New file
    	* gdb.btrace/decrement.S: New file
    	* gdb.btrace/disable_all.exp: New file
    	* gdb.btrace/enable_all.exp: New file
    	* gdb.btrace/enable_range.exp: New file
    	* gdb.btrace/list_options.exp: New file
    	* gdb.btrace/main.S: New file
    	* gdb.btrace/main_asm.exp: New file
    	* gdb.btrace/main_segv.exp: New file
    	* gdb.btrace/main_segv.S: New file
    	* gdb.btrace/sanity_crash.exp: New file
    	* gdb.btrace/sanity_crash.S: New file
    	* gdb.btrace/amd64-thr-callback.S: New file
    	* gdb.btrace/i386-thr-callback.S: New file
    	* gdb.btrace/threads.c: New file
    	* gdb.btrace/threads_asm.c: New file
    	* gdb.btrace/threads_auto.exp: New file
    	* gdb.btrace/threads_independent.exp: New file
    	* gdb.btrace/threads_nonstop.exp: New file
    	* gdb.btrace/trace_iteration.exp: New file
    
    Change-Id: Idcaff760ea29a4111d6c080b63b8e4683db1456e

commit 2d0fa1b8d94fe9fdda1e3dea5854a4488e7fe6e5
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Tue Dec 13 14:41:49 2011 +0100

    test, btrace: add branch tracing tests
    
    Add tests covering btrace enable/disable/auto and btrace list.
    
    Signed-off-by: Markus Metzger  <markus.t.metzger@intel.com>
    
    testsuite/
    	* configure.ac: Add gdb.btrace makefile.
    	* configure: Regenerated.
    	* lib/btrace.exp: New file.
    	* gdb.btrace/Makefile.in: New file.
    	* gdb.btrace/enable.exp: New file.
    	* gdb.btrace/list.exp: New file.
    	* gdb.btrace/x86-list.S: New file.
    
    Change-Id: I5ee3daa23361746123624ee82c2950d171428be6

commit 7244ad83b39046ee8053aca0c29f186ae174739a
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Fri Jan 20 16:21:40 2012 +0100

    gdbserver, linux, btrace: add btrace support for linux-low
    
    Implement btrace target ops in target linux-low using the common linux-btrace
    functions.
    
    Signed-off-by: Markus Metzger  <markus.t.metzger@intel.com>
    
    gdbserver/
    	* linux-low: Include linux-btrace.h.
    	(linux_low_enable_btrace): New function.
    	(linux_low_read_btrace): New function.
    	(linux_target_ops): Add btrace ops.
    	* configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
    	Add srv_linux_btrace=yes.
    	(x86_64-*-linux*): Add linux-btrace.o.
    	Add srv_linux_btrace=yes.
    	* configure.ac: Define HAVE_LINUX_BTRACE.
    	* config.in: Regenerated.
    	* configure: Regenerated.
    
    Change-Id: I4dbf1bef9fe6f557b711f9598a1b1a68bfd38504

commit eb62d133bb89ab45d14d142c01e23daa17acb584
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Wed Jan 18 20:11:14 2012 +0100

    gdbserver, btrace: add generic btrace support
    
    Add support to gdbserver to understand branch trace related packages.
    
    Signed-off-by: Markus Metzger  <markus.t.metzger@intel.com>
    
    gdbserver/
    	* target.h (struct target_ops): Add btrace ops.
    	(target_supports_btrace): New macro.
    	(target_btrace_has_changed): New macro.
    	(target_enable_btrace): New macro.
    	(target_disable_btrace): New macro.
    	(target_read_btrace): New macro.
    	* gdbthread.h (struct thread_info): Add btrace field.
    	* server.c (handle_btrace_general_set): New function.
    	(handle_btrace_enable): New function.
    	(handle_btrace_disable): New function.
    	(handle_general_set): Call handle_btrace_general_set.
    	(handle_qxfer_btrace): New function.
    	(struct qxfer qxfer_packets[]): Add btrace entry.
    	(handle_btrace_query): New function.
    	(handle_query): Add btrace to supported query, call handle_btrace_query.
    	* inferiors.c (remove_thread): Disable btrace.
    
    Change-Id: I8aa02612bb461e04bfeb2bb6b4a363ad7de55dbe

commit 1ac0a20e2b406c17ac97077349ebd5657d2983d5
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Tue Dec 4 11:29:46 2012 +0100

    btrace, doc: document remote serial protocol
    
    Document the extensions to the remote serial protocol for supporting branch tracing.
    
    This patch has been reviewed and approved by Eli Zaretskii.
    
    Signed-off-by: Markus Metzger  <markus.t.metzger@intel.com>
    
    doc/
    	* gdb.texinfo (Requirements): List qXfer:btrace:read requiring expat.
    	(General Query Packets): Describe qbtrace, Qbtrace, and qXfer:btrace:read.
    
    Change-Id: Ie5b84a947a926624d803be3deacea2f6c55b3381

commit 6be537e611bea6b0663680b155203e665fad0217
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Thu Jan 19 14:15:34 2012 +0100

    remote, btrace: add branch trace remote ops
    
    Add the gdb remote target operations for branch tracing. We define the following
    packets:
    
      qbtrace             query the current thread if new trace data is available
                          returns "yes" or "no" or "Enn"
    
      Qbtrace:on          enable branch tracing for the current thread
                          returns "OK" or "Enn"
    
      Qbtrace:off         disable branch tracing for the current thread
                          returns "OK" or "Enn"
    
      qXfer:btrace:read   read the full branch trace data for the current thread
    
    Signed-off-by: Markus Metzger  <markus.t.metzger@intel.com>
    
    	* target.h (enum target_object): Add TARGET_OBJECT_BTRACE.
    	* remote.c: Include btrace.h.
    	(struct btrace_target_info): New struct.
    	(remote_supports_btrace): New function.
    	(send_Qbtrace): New function.
    	(remote_enable_btrace): New function.
    	(remote_disable_btrace): New function.
    	(remote_btrace_has_changed): New function.
    	(remote_read_btrace): New function.
    	(init_remote_ops): Add btrace ops.
    	(enum <unnamed>): Add btrace packets.
    	(struct protocol_feature remote_protocol_features[]): Add btrace packets.
    	(_initialize_remote): Add packet configuration for branch tracing.
    
    Change-Id: Id26dd9ab14a7cf370f00e498a4ae1e7f057fa6c8

commit 0f04a9204109ae0d190080da079811c79672c181
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Mon Jan 23 19:22:05 2012 +0100

    xml, btrace: define btrace xml document style
    
    Define the xml document style for transferring branch trace data.
    
    Add a function to parse a btrace xml document into a vector of branch trace
    blocks.
    
    Signed-off-by: Markus Metzger  <markus.t.metzger@intel.com>
    
    	* features/btrace.dtd: New file.
    	* Makefile.in (XMLFILES): Add btrace.dtd.
    	* btrace.h (parse_xml_btrace): New declaration.
    	* btrace.c (parse_xml_btrace): New function.
    	(parse_xml_btrace_block): New function.
    	(block_attributes): New struct.
    	(btrace_attributes): New struct.
    	(btrace_children): New struct.
    	(btrace_elements): New struct.
    
    Change-Id: I83b621a1aa60f90aa2693acee5704831ce8e426b

commit 641318f3b4f9e762955f30aca021453f9f0e0c11
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Thu Jan 12 17:24:03 2012 +0100

    linux, i386, amd64: enable btrace for 32bit and 64bit linux native
    
    Install the btrace target ops for i386-linux-nat and amd64-linux-nat.
    
    Signed-off-by: Markus Metzger  <markus.t.metzger@intel.com>
    
    	* amd64-linux-nat.c: Include btrace.h and linux-btrace.h.
    	(amd64_linux_enable_btrace): New.
    	(amd64_linux_disable_btrace): New.
    	(_initialize_amd64_linux_nat): Initialize btrace ops.
    	* i386-linux.nat.c: Include btrace.h and linux-btrace.h.
    	(i386_linux_enable_btrace): New.
    	(i386_linux_disable_btrace): New.
    	(_initialize_i386_linux_nat): Initialize btrace ops.
    	* config/i386/linux.mh: Add linux-btrace.o.
    	* config/i386/linux64.mh: Add linux-btrace.o.
    
    Change-Id: I3edae68584fa6dfd58c184c0427515b6c1028367

commit 9fba3d4556ef5243cae18a434afabb7552c3463e
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Fri Jan 20 12:15:48 2012 +0100

    linux, btrace: perf_event based branch tracing
    
    Implement branch tracing on Linux based on perf_event such taht it can be shared
    between gdb and gdbserver.
    
    The actual btrace target ops will be implemented on top.
    
    Signed-off-by: Markus Metzger  <markus.t.metzger@intel.com>
    
    	* common/linux_btrace.h: New file.
    	* common/linux_btrace.c: New file.
    	* Makefile.in (SFILES): Add btrace.c.
    	(HFILES_NO_SRCDIR): Add common/linux-btrace.h.
    	(COMMON_OBS): Add btrace.o.
    	(linux-btrace.o): New rule.
    
    gdbserver/
    	* Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
    	(linux_btrace_h): New variable.
    	(linux-btrace.o): New rule.
    
    Change-Id: I2dd637d17366756b4187da22d35f905229578284

commit 805594fecb09865c68dbc8d95730216aa8106a66
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Wed Jan 11 18:58:49 2012 +0100

    cli, btrace: add btrace cli
    
    Add branch trace commands:
    
      - "btrace enable/disable" perform the obvious operation
    
        ""     on the current thread.
        "all"  on each existing thread.
        "auto" on each newly created thread.
    
        Actually, "btrace enable auto" turns on automatic enabling for new threads,
        and "btrace disable auto" turns it off, again.
    
      - "btrace list" prints the blocks that have been traced.
    
        The output may be configured using modifiers. It prints:
          -  the block number
          /a the begin and end code address of that block
          /f the function containing the block
          /l the source lines contained in the block
    
        With the /t modifier, it prints the total number of blocks and exits.
    
        It accepts an optional range argument specifying the range of blocks to be
        listed. If no argument is given, all blocks are listed.
    
        The block number can be used to print the trace for one particular block or
        for a range of blocks.
    
      - "btrace" prints the branch trace disassembly for the current thread.
    
        Branch trace is printed block-by-block. Typically, one block at a time is
        printed.
    
        By default, the disassembly for the next block is printed, thus iterating
        over the full branch trace.
    
        The command supports the /m and /r modifiers accepted by the disassemble
        command.
    
        In addition, the command supports the following arguments:
          - "<n>"      set the iterator to the <n>-th block
          - "+[<n>]"   advance the iterator by <n>  (default: 1)
          - "-[<n>]"   advance the iterator by -<n> (default: 1)
          - "<l>-<h>"  set the iterator to the <h>'th block and
                       print the blocks in the range in reverse (i.e. original
                       control flow) order.
    
        Mixed source and disassembly does not work very well for inlined functions,
        a problem that it shares with the disassemble command.
    
    Signed-off-by: Markus Metzger  <markus.t.metzger@intel.com>
    
    	* btrace.c (warn_enable_btrace): New function.
    	(warn_disable_btrace): New function.
    	(cmd_btrace_enable): New function.
    	(cmd_btrace_enable_all): New function.
    	(cmd_btrace_enable_auto): New function.
    	(cmd_btrace_disable): New function.
    	(cmd_btrace_disable_all): New function.
    	(cmd_btrace_disable_auto): New function.
    	(do_btrace_list_address): New function.
    	(do_btrace_list_function): New function.
    	(do_btrace_list_line): New function.
    	(do_btrace_list_item): New function.
    	(do_btrace_list): New function.
    	(cmd_btrace_list): New function.
    	(do_btrace): New function.
    	(do_btrace_range): New function.
    	(do_prev_btrace): New function.
    	(do_next_btrace): New function.
    	(cmd_btrace): New function.
    	(_initialize_btrace): New function.
    
    Change-Id: I36330339590bd4357ebb39ce850657c76e02fe7e

commit 1479e816769e6ac8c9b9c9d4da34268090a12223
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Tue Jan 10 19:31:26 2012 +0100

    thread, btrace: add generic branch trace support
    
    Add branch trace information to struct thread_info to hold the branch trace
    information for that thread.
    
    Add functions to enable/disable, and get a thread's branch trace, as well as
    for iterating over it.
    
    Iteration uses a per-thread iterator stored in the thread_info's branch trace
    information.
    
    Iterators are reset implicitly when a thread's branch trace changes.
    
    Signed-off-by: Markus Metzger  <markus.t.metzger@intel.com>
    
    	* target.h: Include btrace.h.
    	(struct target_ops): Add btrace ops.
    	* target.c (update_current_target): Initialize btrace ops.
    	(target_supports_btrace): New function.
    	(target_enable_btrace): New function.
    	(target_disable_btrace): New function.
    	(target_read_btrace): New function.
    	(target_btrace_has_changed): New function.
    	* btrace.h: New file.
    	* btrace.c: New file.
    	* Makefile.in: Add btrace.c.
    	* gdbthread.h: Include btrace.h.
    	(struct thread_info): Add btrace field.
    	* thread.c: Include btrace.h.
    	(clear_thread_inferior_resources): Call disable_btrace.
    	* infcmd.c: Include btrace.h.
    	(detach_command): Call disconnect_btrace.
    	* common/btrace-common.h: New file.
    
    Change-Id: Ie39f821b89778d926183975914992c81c0f82029

-----------------------------------------------------------------------


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-02-27 20:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-27 20:59 [SCM] mmetzger/btrace: reverse-20080717-branchpoint-13963-g5dd7aa4 tromey

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).