Documented aop_type.
authorJustin Seyster <jseyster@cs.sunysb.edu>
Mon, 11 Oct 2010 22:26:15 +0000 (18:26 -0400)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Mon, 11 Oct 2010 22:26:15 +0000 (18:26 -0400)
src/aop-doxy-main.c

index 025743f130b9fa8e5f565d4c89cd1aaafa998679..c880321c596e995cf3071ad24c88a812ba2a75e7 100644 (file)
  * structure, in order to avoid any accesses to the join point after
  * it becomes invalid.
  */
+
+/**
+ * \struct aop_type
+ * \brief A type object used to match types in the instrumented
+ * program.
+ *
+ * Most pointcuts can be refined by type, using functions like
+ * aop_match_assignment_by_type() or aop_filter_call_pc_by_param().
+ * An aop_type object represents specific criteria for matching a type
+ * in the target program.  As a simple example, the type returned by
+ * aop_t_all_signed() will match (almost) any signed integer type
+ * (int, char, int16_t, et al.).  There are several useful "all"
+ * types:
+ *
+ * - aop_t_all_signed()
+ * - aop_t_all_unsigned()
+ * - aop_t_all_fp()
+ * - aop_t_all_pointer()
+ *
+ * Additionally, there are aop_type objects for matching very specific
+ * target types, such as aop_t_signed32().  See the complete list of
+ * \ref type "InterAspect types".
+ *
+ * Besides providing filtering criteria, aop_type objects are also
+ * used to specify how a parameter gets passed to an advice hook at
+ * the target language level.  Every aop_dynval has an associated
+ * aop_type which controls how it is represented in the hook function
+ * prototype.  For example, a dynval with an associated
+ * aop_t_all_signed() type will be passed as <code>int64_t</code>
+ * because a 64-bit integer can hold any value that fits in one of the
+ * types that aop_t_all_signed() can match.
+ *
+ * All aop_type objects have an indefinite lifetime: you can store
+ * pointers to an aop_type anywhere without worrying that the
+ * reference will become stale.  Additionally, aop_type objects are
+ * stored with <a href="http://en.wikipedia.org/wiki/Hash_consing">
+ * hash consing</a>, so recreating identical aop_type objects will not
+ * unnecessarily consume memory.  InterAspect cleans up all aop_type
+ * objects for you when the compiler exits.
+ */