public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* [patch][commit] Collection of profiling information
@ 2006-05-09 18:16 Dave Brolley
  0 siblings, 0 replies; only message in thread
From: Dave Brolley @ 2006-05-09 18:16 UTC (permalink / raw)
  To: cgen

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

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

[-- Attachment #2: cgen-profile.ChangeLog --]
[-- Type: text/plain, Size: 140 bytes --]

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

	* sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
	abuf->written if profiling.

[-- Attachment #3: cgen-profile.patch.txt --]
[-- Type: text/plain, Size: 1300 bytes --]

? 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")

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

only message in thread, other threads:[~2006-05-09 18:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-09 18:16 [patch][commit] Collection of profiling information Dave Brolley

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