/[gxemul]/trunk/experiments/ic_statistics.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/experiments/ic_statistics.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 23 by dpavlin, Mon Oct 8 16:19:37 2007 UTC revision 24 by dpavlin, Mon Oct 8 16:19:56 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Copyright (C) 2005  Anders Gavare.  All rights reserved.   *  Copyright (C) 2005-2006  Anders Gavare.  All rights reserved.
3   *   *
4   *  Redistribution and use in source and binary forms, with or without   *  Redistribution and use in source and binary forms, with or without
5   *  modification, are permitted provided that the following conditions are met:   *  modification, are permitted provided that the following conditions are met:
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: ic_statistics.c,v 1.2 2005/12/19 02:16:39 debug Exp $   *  $Id: ic_statistics.c,v 1.3 2006/03/30 19:36:03 debug Exp $
29   *   *
30   *  This program is not optimized for speed, but it should work.   *  This program is not optimized for speed, but it should work.
31   *   *
# Line 37  Line 37 
37  #include <stdlib.h>  #include <stdlib.h>
38  #include <string.h>  #include <string.h>
39  #include <sys/types.h>  #include <sys/types.h>
40    #include <inttypes.h>
41    
42    
43  struct entry {  struct entry {
# Line 73  char *cached_size_t_to_symbol(size_t s) Line 74  char *cached_size_t_to_symbol(size_t s)
74          cache_s[n_cached_symbols - 1] = s;          cache_s[n_cached_symbols - 1] = s;
75    
76          snprintf(tmp, sizeof(tmp), "nm ../gxemul | grep "          snprintf(tmp, sizeof(tmp), "nm ../gxemul | grep "
77              "%llx", (long long)s);              "%"PRIx64, (uint64_t)s);
78          q = popen(tmp, "r");          q = popen(tmp, "r");
79          if (q == NULL) {          if (q == NULL) {
80                  perror("popen()");                  perror("popen()");

Legend:
Removed from v.23  
changed lines
  Added in v.24

  ViewVC Help
Powered by ViewVC 1.1.26