OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel-0-3-0-rc1/] [or1ksim/] [support/] [profile.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 547 markom
/* profile.c -- functions for profiling
2 1748 jeremybenn
 
3 547 markom
   Copyright (C) 2002 Marko Mlinar, markom@opencores.org
4 1748 jeremybenn
   Copyright (C) 2008 Embecosm Limited
5 547 markom
 
6 1748 jeremybenn
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
7 547 markom
 
8 1748 jeremybenn
   This file is part of Or1ksim, the OpenRISC 1000 Architectural Simulator.
9 547 markom
 
10 1748 jeremybenn
   This program is free software; you can redistribute it and/or modify it
11
   under the terms of the GNU General Public License as published by the Free
12
   Software Foundation; either version 3 of the License, or (at your option)
13
   any later version.
14 547 markom
 
15 1748 jeremybenn
   This program is distributed in the hope that it will be useful, but WITHOUT
16
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
18
   more details.
19 547 markom
 
20 1748 jeremybenn
   You should have received a copy of the GNU General Public License along
21
   with this program.  If not, see <http://www.gnu.org/licenses/>.  */
22 1350 nogj
 
23 1748 jeremybenn
/* This program is commented throughout in a fashion suitable for processing
24
   with Doxygen. */
25
 
26
 
27
/* Autoconf and/or portability configuration */
28 1350 nogj
#include "config.h"
29
 
30 1748 jeremybenn
/* System includes */
31
#include <stdio.h>
32 1350 nogj
 
33 1748 jeremybenn
/* Package includes */
34 547 markom
#include "profile.h"
35
#include "sim-config.h"
36 1748 jeremybenn
#include "arch.h"
37 547 markom
 
38 1748 jeremybenn
 
39 547 markom
/* Adds a new entry to the memory profile file */
40 1748 jeremybenn
void
41
mprofile (oraddr_t memaddr, unsigned char type)
42 547 markom
{
43
  struct mprofentry_struct mp;
44
  mp.addr = memaddr;
45
  mp.type = type;
46 1748 jeremybenn
  if (!fwrite (&mp, sizeof (struct mprofentry_struct), 1, runtime.sim.fmprof))
47 547 markom
    config.sim.mprofile = 0;
48
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.