-/* Standard profilable entities. */
-#define PROFILE_INSN_IDX 0
-#define PROFILE_MEMORY_IDX 1
-#define PROFILE_MODEL_IDX 2
-#define PROFILE_SCACHE_IDX 3
-#define PROFILE_PC_IDX 4
-#define PROFILE_CORE_IDX 5
-#define PROFILE_NEXT_IDX 6 /* simulator specific profile bits begin here */
-
-/* Masks so WITH_PROFILE can have symbolic values. */
-#define PROFILE_insn 1
-#define PROFILE_memory 2
-#define PROFILE_model 4
-#define PROFILE_scache 8
-#define PROFILE_pc 16
-#define PROFILE_core 32
+/* The -p option only prints useful values. It's easy to type and shouldn't
+ splat on the screen everything under the sun making nothing easy to
+ find. */
+#define PROFILE_USEFUL_MASK \
+((1 << PROFILE_INSN_IDX) \
+ | (1 << PROFILE_MEMORY_IDX) \
+ | (1 << PROFILE_MODEL_IDX) \
+ | (1 << PROFILE_CORE_IDX))
+
+/* Utility to set profile options. */
+SIM_RC set_profile_option_mask (SIM_DESC sd_, const char *name_, int mask_,
+ const char *arg_);
+
+/* Utility to parse a --profile-<foo> option. */
+/* ??? On the one hand all calls could be confined to sim-profile.c, but
+ on the other hand keeping a module's profiling option with the module's
+ source is cleaner. */
+
+SIM_RC sim_profile_set_option (SIM_DESC sd_, const char *name_, int idx_,
+ const char *arg_);
+\f
+/* Masks so WITH_PROFILE can have symbolic values.
+ The case choice here is on purpose. The lowercase parts are args to
+ --with-profile. */
+#define PROFILE_insn (1 << PROFILE_INSN_IDX)
+#define PROFILE_memory (1 << PROFILE_MEMORY_IDX)
+#define PROFILE_model (1 << PROFILE_MODEL_IDX)
+#define PROFILE_scache (1 << PROFILE_SCACHE_IDX)
+#define PROFILE_pc (1 << PROFILE_PC_IDX)
+#define PROFILE_core (1 << PROFILE_CORE_IDX)