2 * Copyright (c) 1996-2004 Barton P. Miller
4 * We provide the Paradyn Parallel Performance Tools (below
5 * described as "Paradyn") on an AS IS basis, and do not warrant its
6 * validity or performance. We reserve the right to update, modify,
7 * or discontinue this software at any time. We shall have no
8 * obligation to supply such updates or modifications or any other
9 * form of support to you.
11 * This license is for research uses. For such uses, there is no
12 * charge. We define "research use" to mean you may freely use it
13 * inside your organization for whatever purposes you see fit. But you
14 * may not re-distribute Paradyn or parts of Paradyn, in any form
15 * source or binary (including derivatives), electronic or otherwise,
16 * to any other organization or entity without our permission.
18 * (for other uses, please contact us at paradyn@cs.wisc.edu)
20 * All warranties, including without limitation, any warranty of
21 * merchantability or fitness for a particular purpose, are hereby
24 * By your use of Paradyn, you understand and agree that we (or any
25 * other person or entity with proprietary rights in Paradyn) are
26 * under no obligation to provide either maintenance services,
27 * update services, notices of latent defects, or correction of
28 * defects for Paradyn.
30 * Even if advised of the possibility of such damages, under no
31 * circumstances shall we (or any other person or entity with
32 * proprietary rights in the software licensed hereunder) be liable
33 * to you or any third party for direct, indirect, or consequential
34 * damages of any character regardless of type of action, including,
35 * without limitation, loss of profits, loss of use, loss of good
36 * will, or computer failure or malfunction. You agree to indemnify
37 * us (and any other person or entity with proprietary rights in the
38 * software licensed hereunder) for any and all liability it may
39 * incur to third parties resulting from your use of Paradyn.
43 * $Id: dyninstAPI_RT.h,v 1.28 2006/01/13 00:00:48 jodom Exp $
44 * This file contains the standard instrumentation functions that are provided
45 * by the run-time instrumentation layer.
48 #ifndef _DYNINSTAPI_RT_H
49 #define _DYNINSTAPI_RT_H
52 * Define the size of the per process data area.
54 * This should be a power of two to reduce paging and caching shifts.
55 * Note that larger sizes may result in requiring longjumps within
56 * mini-trampolines to reach within this area.
59 #define SYN_INST_BUF_SIZE (1024*1024*4)
62 #include "dyninstRTExport.h"
63 #include "common/h/Types.h"
65 #include "dyninstAPI/src/linux-signals.h"
68 /* If we must make up a boolean type, we should make it unique */
69 typedef unsigned char RT_Boolean;
70 static const RT_Boolean RT_TRUE=1;
71 static const RT_Boolean RT_FALSE=0;
73 extern char gLoadLibraryErrorString[];
76 struct DYNINST_bootstrapStruct {
77 int event; /* "event" values:
79 1 --> end of DYNINSTinit (normal)
80 2 --> end of DYNINSTinit (forked process)
81 3 --> start of DYNINSTexec (before exec)
84 int ppid; /* parent of forked process */
87 typedef enum {DSE_undefined, DSE_forkEntry, DSE_forkExit, DSE_execEntry, DSE_execExit, DSE_exitEntry, DSE_loadLibrary} DYNINST_synch_event_t;
89 extern int DYNINSTdebugPrintRT; /* control run-time lib debug/trace prints */
90 #if !defined(RTprintf)
91 #define RTprintf if (DYNINSTdebugPrintRT) printf
94 #define THREAD_AWAITING_DELETION -2
96 #define ERROR_STRING_LENGTH 256
99 rtBPatch_newConnectionEvent,
100 rtBPatch_internalShutDownEvent,
101 rtBPatch_threadCreateEvent,
102 rtBPatch_threadDestroyEvent,
103 rtBPatch_dynamicCallEvent,
105 } rtBPatch_asyncEventType;
110 rtBPatch_asyncEventType type;
111 unsigned int event_fd;
113 } rtBPatch_asyncEventRecord;
117 void *call_site_addr;
119 } BPatch_dynamicCallRecord;
122 int ppid; //Parent process's pid
123 dyntid_t tid; //Thread library ID for thread
124 int lwp; //OS id for thread
125 int index; //The dyninst index for this thread
126 void *stack_addr; //The top of this thread's stack
127 void *start_pc; //The pc of this threads initial function
128 } BPatch_newThreadEventRecord;
131 int index; //Index of the dead thread
132 } BPatch_deleteThreadEventRecord;
134 #include "dyninstRTExport.h"
135 #endif /* _DYNINSTAPI_RT_H */