This is the mail archive of the cgen@sourceware.org mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch][commit] Collection of profiling information


Hi,

I've committed the attached patch which adds a missing bit of code generation needed for implementing pipeline models. It is similar to code already committed elsewhere for this purpose and was taken from the sim generator. Tested on an internal port which exposed the problem.

Dave
2006-05-09  Dave Brolley  <brolley@redhat.com>

	* sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
	abuf->written if profiling.
? cgen/string
Index: cgen/sid-cpu.scm
===================================================================
RCS file: /cvs/src/src/cgen/sid-cpu.scm,v
retrieving revision 1.15
diff -c -p -r1.15 sid-cpu.scm
*** cgen/sid-cpu.scm	28 Dec 2005 18:59:24 -0000	1.15
--- cgen/sid-cpu.scm	9 May 2006 18:05:32 -0000
***************
*** 1,5 ****
  ; CPU family related simulator generator, excluding decoding and model support.
! ; Copyright (C) 2000, 2002, 2003, 2005 Red Hat, Inc.
  ; This file is part of CGEN.
  
  ; ***********
--- 1,5 ----
  ; CPU family related simulator generator, excluding decoding and model support.
! ; Copyright (C) 2000, 2002, 2003, 2005, 2006 Red Hat, Inc.
  ; This file is part of CGEN.
  
  ; ***********
*************** using namespace cgen;
*** 748,753 ****
--- 748,761 ----
       "\n"
       (gen-semantic-code insn)
       "\n"
+      ; Only update what's been written if some are conditionally written.
+      ; Otherwise we know they're all written so there's no point in
+      ; keeping track.
+      (if (or (with-profile?) (with-parallel-write?))
+ 	 (if (-any-cond-written? (insn-sfmt insn))
+ 	     "  abuf->written = written;\n"
+ 	     "")
+ 	 "")
       (if cti?
  	 "  current_cpu->done_cti_insn (npc, status);\n"
  	 "  current_cpu->done_insn (npc, status);\n")

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]