[Pvfs2-cvs] commit by slang in pvfs2/src/io/trove/trove-dbpf: dbpf-alt-aio.c dbpf-bstream.c dbpf-dspace.c dbpf-keyval.c dbpf-mgmt.c dbpf-op-queue.c dbpf-op.h dbpf.h

CVS commit program cvs at parl.clemson.edu
Mon Apr 7 12:31:29 EDT 2008


Update of /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf
In directory parlweb1:/tmp/cvs-serv1608/src/io/trove/trove-dbpf

Modified Files:
      Tag: he-branch
	dbpf-alt-aio.c dbpf-bstream.c dbpf-dspace.c dbpf-keyval.c 
	dbpf-mgmt.c dbpf-op-queue.c dbpf-op.h dbpf.h 
Log Message:
hints and events.


Index: dbpf-alt-aio.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-alt-aio.c,v
diff -p -u -r1.8 -r1.8.12.1
--- dbpf-alt-aio.c	12 Apr 2007 03:40:41 -0000	1.8
+++ dbpf-alt-aio.c	7 Apr 2008 16:31:28 -0000	1.8.12.1
@@ -270,68 +270,72 @@ static void* alt_lio_thread(void* foo)
 
 static int alt_aio_bstream_read_list(TROVE_coll_id coll_id,
                                      TROVE_handle handle,
-                                     char **mem_offset_array, 
+                                     char **mem_offset_array,
                                      TROVE_size *mem_size_array,
                                      int mem_count,
-                                     TROVE_offset *stream_offset_array, 
+                                     TROVE_offset *stream_offset_array,
                                      TROVE_size *stream_size_array,
                                      int stream_count,
                                      TROVE_size *out_size_p,
-                                     TROVE_ds_flags flags, 
+                                     TROVE_ds_flags flags,
                                      TROVE_vtag_s *vtag,
                                      void *user_ptr,
                                      TROVE_context_id context_id,
-                                     TROVE_op_id *out_op_id_p)
+                                     TROVE_op_id *out_op_id_p,
+                                     PVFS_hint  hints)
 {
     return dbpf_bstream_rw_list(coll_id,
                                 handle,
-                                mem_offset_array, 
+                                mem_offset_array,
                                 mem_size_array,
                                 mem_count,
-                                stream_offset_array, 
+                                stream_offset_array,
                                 stream_size_array,
                                 stream_count,
                                 out_size_p,
-                                flags, 
+                                flags,
                                 vtag,
                                 user_ptr,
                                 context_id,
                                 out_op_id_p,
                                 LIO_READ,
-                                &alt_aio_ops);
+                                &alt_aio_ops,
+                                hints);
 }
 
 static int alt_aio_bstream_write_list(TROVE_coll_id coll_id,
                                       TROVE_handle handle,
-                                      char **mem_offset_array, 
+                                      char **mem_offset_array,
                                       TROVE_size *mem_size_array,
                                       int mem_count,
-                                      TROVE_offset *stream_offset_array, 
+                                      TROVE_offset *stream_offset_array,
                                       TROVE_size *stream_size_array,
                                       int stream_count,
                                       TROVE_size *out_size_p,
-                                      TROVE_ds_flags flags, 
+                                      TROVE_ds_flags flags,
                                       TROVE_vtag_s *vtag,
                                       void *user_ptr,
                                       TROVE_context_id context_id,
-                                      TROVE_op_id *out_op_id_p)
+                                      TROVE_op_id *out_op_id_p,
+                                      PVFS_hint  hints)
 {
     return dbpf_bstream_rw_list(coll_id,
                                 handle,
-                                mem_offset_array, 
+                                mem_offset_array,
                                 mem_size_array,
                                 mem_count,
-                                stream_offset_array, 
+                                stream_offset_array,
                                 stream_size_array,
                                 stream_count,
                                 out_size_p,
-                                flags, 
+                                flags,
                                 vtag,
                                 user_ptr,
                                 context_id,
                                 out_op_id_p,
                                 LIO_WRITE,
-                                &alt_aio_ops);
+                                &alt_aio_ops,
+                                hints);
 }
 
 static struct dbpf_aio_ops alt_aio_ops =

Index: dbpf-bstream.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-bstream.c,v
diff -p -u -r1.80 -r1.80.12.1
--- dbpf-bstream.c	1 Jun 2007 20:58:05 -0000	1.80
+++ dbpf-bstream.c	7 Apr 2008 16:31:28 -0000	1.80.12.1
@@ -141,6 +141,7 @@ static void aio_progress_notification(un
         ret = 0;
 
       final_threaded_aio_cleanup:
+
         if ((op_p->type == BSTREAM_WRITE_AT) ||
             (op_p->type == BSTREAM_WRITE_LIST))
         {
@@ -436,10 +437,11 @@ int dbpf_bstream_read_at(TROVE_coll_id c
                          TROVE_size *inout_size_p,
                          TROVE_offset offset,
                          TROVE_ds_flags flags,
-                         TROVE_vtag_s *vtag, 
+                         TROVE_vtag_s *vtag,
                          void *user_ptr,
                          TROVE_context_id context_id,
-                         TROVE_op_id *out_op_id_p)
+                         TROVE_op_id *out_op_id_p,
+                         PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_collection *coll_p = NULL;
@@ -470,6 +472,7 @@ int dbpf_bstream_read_at(TROVE_coll_id c
     q_op_p->op.u.b_read_at.offset = offset;
     q_op_p->op.u.b_read_at.size = *inout_size_p;
     q_op_p->op.u.b_read_at.buffer = buffer;
+    q_op_p->op.hints = hints;
 
     *out_op_id_p = dbpf_queued_op_queue(q_op_p);
 
@@ -533,11 +536,12 @@ int dbpf_bstream_write_at(TROVE_coll_id 
                           TROVE_vtag_s *vtag,
                           void *user_ptr,
                           TROVE_context_id context_id,
-                          TROVE_op_id *out_op_id_p)
+                          TROVE_op_id *out_op_id_p,
+                          PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_collection *coll_p = NULL;
-    
+
     coll_p = dbpf_collection_find_registered(coll_id);
     if (coll_p == NULL)
     {
@@ -564,6 +568,7 @@ int dbpf_bstream_write_at(TROVE_coll_id 
     q_op_p->op.u.b_write_at.offset = offset;
     q_op_p->op.u.b_write_at.size = *inout_size_p;
     q_op_p->op.u.b_write_at.buffer = buffer;
+    q_op_p->op.hints = hints;
 
     *out_op_id_p = dbpf_queued_op_queue(q_op_p);
 
@@ -627,7 +632,8 @@ int dbpf_bstream_flush(TROVE_coll_id col
                        TROVE_ds_flags flags,
                        void *user_ptr,
                        TROVE_context_id context_id,
-                       TROVE_op_id *out_op_id_p)
+                       TROVE_op_id *out_op_id_p,
+                       PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_collection *coll_p = NULL;
@@ -653,7 +659,7 @@ int dbpf_bstream_flush(TROVE_coll_id col
                         user_ptr,
                         flags,
                         context_id);
-    
+    q_op_p->op.hints = hints;
     *out_op_id_p = dbpf_queued_op_queue(q_op_p);
     return 0;
 }
@@ -665,7 +671,7 @@ static int dbpf_bstream_flush_op_svc(str
     struct open_cache_ref tmp_ref;
 
     ret = dbpf_open_cache_get(
-        op_p->coll_p->coll_id, op_p->handle, 
+        op_p->coll_p->coll_id, op_p->handle,
         DBPF_FD_BUFFERED_WRITE, &tmp_ref);
     if (ret < 0)
     {
@@ -697,7 +703,8 @@ int dbpf_bstream_resize(TROVE_coll_id co
                         TROVE_vtag_s *vtag,
                         void *user_ptr,
                         TROVE_context_id context_id,
-                        TROVE_op_id *out_op_id_p)
+                        TROVE_op_id *out_op_id_p,
+                        PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_collection *coll_p = NULL;
@@ -723,9 +730,10 @@ int dbpf_bstream_resize(TROVE_coll_id co
                         user_ptr,
                         flags,
                         context_id);
-    
+
     /* initialize the op-specific members */
     q_op_p->op.u.b_resize.size = *inout_size_p;
+    q_op_p->op.hints = hints;
 
     *out_op_id_p = dbpf_queued_op_queue(q_op_p);
 
@@ -782,75 +790,80 @@ int dbpf_bstream_validate(TROVE_coll_id 
                           TROVE_vtag_s *vtag,
                           void *user_ptr,
                           TROVE_context_id context_id,
-                          TROVE_op_id *out_op_id_p)
+                          TROVE_op_id *out_op_id_p,
+                          PVFS_hint  hints)
 {
     return -TROVE_ENOSYS;
 }
 
 static int dbpf_bstream_read_list(TROVE_coll_id coll_id,
                                   TROVE_handle handle,
-                                  char **mem_offset_array, 
+                                  char **mem_offset_array,
                                   TROVE_size *mem_size_array,
                                   int mem_count,
-                                  TROVE_offset *stream_offset_array, 
+                                  TROVE_offset *stream_offset_array,
                                   TROVE_size *stream_size_array,
                                   int stream_count,
                                   TROVE_size *out_size_p,
-                                  TROVE_ds_flags flags, 
+                                  TROVE_ds_flags flags,
                                   TROVE_vtag_s *vtag,
                                   void *user_ptr,
                                   TROVE_context_id context_id,
-                                  TROVE_op_id *out_op_id_p)
+                                  TROVE_op_id *out_op_id_p,
+                                  PVFS_hint  hints)
 {
     return dbpf_bstream_rw_list(coll_id,
                                 handle,
-                                mem_offset_array, 
+                                mem_offset_array,
                                 mem_size_array,
                                 mem_count,
-                                stream_offset_array, 
+                                stream_offset_array,
                                 stream_size_array,
                                 stream_count,
                                 out_size_p,
-                                flags, 
+                                flags,
                                 vtag,
                                 user_ptr,
                                 context_id,
                                 out_op_id_p,
                                 LIO_READ,
-                                &aio_ops);
+                                &aio_ops,
+                                hints);
 }
 
 static int dbpf_bstream_write_list(TROVE_coll_id coll_id,
                                    TROVE_handle handle,
-                                   char **mem_offset_array, 
+                                   char **mem_offset_array,
                                    TROVE_size *mem_size_array,
                                    int mem_count,
-                                   TROVE_offset *stream_offset_array, 
+                                   TROVE_offset *stream_offset_array,
                                    TROVE_size *stream_size_array,
                                    int stream_count,
                                    TROVE_size *out_size_p,
-                                   TROVE_ds_flags flags, 
+                                   TROVE_ds_flags flags,
                                    TROVE_vtag_s *vtag,
                                    void *user_ptr,
                                    TROVE_context_id context_id,
-                                   TROVE_op_id *out_op_id_p)
+                                   TROVE_op_id *out_op_id_p,
+                                   PVFS_hint  hints)
 {
     return dbpf_bstream_rw_list(coll_id,
                                 handle,
-                                mem_offset_array, 
+                                mem_offset_array,
                                 mem_size_array,
                                 mem_count,
-                                stream_offset_array, 
+                                stream_offset_array,
                                 stream_size_array,
                                 stream_count,
                                 out_size_p,
-                                flags, 
+                                flags,
                                 vtag,
                                 user_ptr,
                                 context_id,
                                 out_op_id_p,
                                 LIO_WRITE,
-                                &aio_ops);
+                                &aio_ops,
+                                hints);
 }
 
 /* dbpf_bstream_rw_list()
@@ -861,26 +874,28 @@ static int dbpf_bstream_write_list(TROVE
  */
 inline int dbpf_bstream_rw_list(TROVE_coll_id coll_id,
                                 TROVE_handle handle,
-                                char **mem_offset_array, 
+                                char **mem_offset_array,
                                 TROVE_size *mem_size_array,
                                 int mem_count,
                                 TROVE_offset *stream_offset_array,
                                 TROVE_size *stream_size_array,
                                 int stream_count,
                                 TROVE_size *out_size_p,
-                                TROVE_ds_flags flags, 
+                                TROVE_ds_flags flags,
                                 TROVE_vtag_s *vtag,
                                 void *user_ptr,
                                 TROVE_context_id context_id,
                                 TROVE_op_id *out_op_id_p,
                                 int opcode,
-                                struct dbpf_aio_ops * aio_ops)
+                                struct dbpf_aio_ops * aio_ops,
+                                PVFS_hint  hints)
 {
     int ret = -TROVE_EINVAL;
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_collection *coll_p = NULL;
     enum dbpf_op_type tmp_type;
-    int event_type, i;
+    PINT_event_type event_type;
+    int i, count_mem;
 #ifdef __PVFS2_TROVE_AIO_THREADED__
     struct dbpf_op *op_p = NULL;
     int aiocb_inuse_count = 0;
@@ -902,12 +917,12 @@ inline int dbpf_bstream_rw_list(TROVE_co
     if (opcode == LIO_READ)
     {
         tmp_type = BSTREAM_READ_LIST;
-        event_type = PVFS_EVENT_TROVE_READ_LIST;
+        event_type = trove_dbpf_read_event_id;
     }
     else
     {
         tmp_type = BSTREAM_WRITE_LIST;
-        event_type = PVFS_EVENT_TROVE_WRITE_LIST;
+        event_type = trove_dbpf_write_event_id;
     }
 
     /* initialize all the common members */
@@ -924,11 +939,24 @@ inline int dbpf_bstream_rw_list(TROVE_co
                         flags,
                         context_id);
 
-    DBPF_EVENT_START(event_type, q_op_p->op.id);
+    for(i = 0; i < mem_count; ++i)
+    {
+        count_mem += mem_size_array[i];
+    }
+
+    q_op_p->event_type = event_type;
+    PINT_EVENT_START(event_type, dbpf_pid, NULL, &q_op_p->event_id,
+                     PINT_HINT_GET_CLIENT_ID(hints),
+                     PINT_HINT_GET_REQUEST_ID(hints),
+                     PINT_HINT_GET_HANDLE(hints),
+                     handle,
+                     PINT_HINT_GET_OP_ID(hints),
+                     count_mem);
 
     if(gossip_debug_enabled(GOSSIP_TROVE_DEBUG))
     {
-        PVFS_size count_mem = 0, count_stream = 0;
+        PVFS_size count_stream = 0;
+        count_mem = 0;
         gossip_debug(GOSSIP_TROVE_DEBUG, 
                      "dbpf_bstream_rw_list: mem_count: %d, stream_count: %d\n",
                      mem_count,
@@ -969,6 +997,7 @@ inline int dbpf_bstream_rw_list(TROVE_co
     q_op_p->op.u.b_rw_list.stream_array_count = stream_count;
     q_op_p->op.u.b_rw_list.stream_offset_array = stream_offset_array;
     q_op_p->op.u.b_rw_list.stream_size_array = stream_size_array;
+    q_op_p->op.hints = hints;
     q_op_p->op.u.b_rw_list.aio_ops = aio_ops;
 
     /* initialize the out size to 0 */

Index: dbpf-dspace.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-dspace.c,v
diff -p -u -r1.157 -r1.157.2.1
--- dbpf-dspace.c	3 Apr 2008 18:44:14 -0000	1.157
+++ dbpf-dspace.c	7 Apr 2008 16:31:28 -0000	1.157.2.1
@@ -77,16 +77,13 @@ static inline void organize_post_op_stat
             UPDATE_PERF_METADATA_READ();
             break;
         case BSTREAM_READ_LIST:
-            DBPF_EVENT_END(PVFS_EVENT_TROVE_READ_LIST, op_id); 
             break;
         case BSTREAM_WRITE_LIST:
-            DBPF_EVENT_END(PVFS_EVENT_TROVE_WRITE_LIST, op_id); 
             break;
         default:
             break;
         case DSPACE_CREATE:
             UPDATE_PERF_METADATA_WRITE();
-            DBPF_EVENT_END(PVFS_EVENT_TROVE_DSPACE_CREATE, op_id); 
             break;
     }
 }
@@ -113,7 +110,8 @@ static int dbpf_dspace_create(TROVE_coll
                               TROVE_ds_flags flags,
                               void *user_ptr,
                               TROVE_context_id context_id,
-                              TROVE_op_id *out_op_id_p)
+                              TROVE_op_id *out_op_id_p,
+                              PVFS_hint hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_op op;
@@ -149,7 +147,12 @@ static int dbpf_dspace_create(TROVE_coll
         return -TROVE_EINVAL;
     }
 
-    DBPF_EVENT_START(PVFS_EVENT_TROVE_DSPACE_CREATE, op_p->id);
+    q_op_p->event_type = trove_dbpf_dspace_create_event_id;
+    PINT_EVENT_START(q_op_p->event_type,
+                     dbpf_pid, NULL, &q_op_p->event_id,
+                     PINT_HINT_GET_CLIENT_ID(hints),
+                     PINT_HINT_GET_REQUEST_ID(hints),
+                     PINT_HINT_GET_OP_ID(hints));
 
     /* this array is freed in dbpf-op.c:dbpf_queued_op_free, or
      * in dbpf_queue_or_service in the case of immediate completion */
@@ -157,6 +160,7 @@ static int dbpf_dspace_create(TROVE_coll
         extent_array->extent_count;
     op_p->u.d_create.extent_array.extent_array =
         malloc(extent_array->extent_count * sizeof(TROVE_extent));
+    op_p->hints = hints;
 
     if (op_p->u.d_create.extent_array.extent_array == NULL)
     {
@@ -346,7 +350,8 @@ static int dbpf_dspace_remove(TROVE_coll
                               TROVE_ds_flags flags,
                               void *user_ptr,
                               TROVE_context_id context_id,
-                              TROVE_op_id *out_op_id_p)
+                              TROVE_op_id *out_op_id_p,
+                              PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_op op;
@@ -375,6 +380,7 @@ static int dbpf_dspace_remove(TROVE_coll
     {
         return ret;
     }
+    op_p->hints = hints;
 
     PINT_perf_count(PINT_server_pc, PINT_PERF_METADATA_DSPACE_OPS,
                     1, PINT_PERF_ADD);
@@ -820,7 +826,8 @@ static int dbpf_dspace_verify(TROVE_coll
                               TROVE_ds_flags flags,
                               void *user_ptr,
                               TROVE_context_id context_id,
-                              TROVE_op_id *out_op_id_p)
+                              TROVE_op_id *out_op_id_p,
+                              PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_op op;
@@ -852,6 +859,7 @@ static int dbpf_dspace_verify(TROVE_coll
     }
 
    /* initialize op-specific members */
+    op_p->hints = hints;
     op_p->u.d_verify.type_p = type_p;
 
     return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p);
@@ -906,7 +914,8 @@ static int dbpf_dspace_getattr(TROVE_col
                                TROVE_ds_flags flags,
                                void *user_ptr,
                                TROVE_context_id context_id,
-                               TROVE_op_id *out_op_id_p)
+                               TROVE_op_id *out_op_id_p,
+                               PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_op op;
@@ -962,8 +971,17 @@ static int dbpf_dspace_getattr(TROVE_col
         return ret;
     }
 
+    q_op_p->event_type = trove_dbpf_dspace_getattr_event_id;
+    PINT_EVENT_START(trove_dbpf_dspace_getattr_event_id,
+                     dbpf_pid, NULL, &q_op_p->event_id,
+                     PINT_HINT_GET_CLIENT_ID(hints),
+                     PINT_HINT_GET_REQUEST_ID(hints),
+                     handle,
+                     PINT_HINT_GET_OP_ID(hints));
+
    /* initialize op-specific members */
     op_p->u.d_getattr.attr_p = ds_attr_p;
+    op_p->hints = hints;
 
     return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p);
 }
@@ -976,7 +994,8 @@ static int dbpf_dspace_getattr_list(TROV
                                TROVE_ds_flags flags,
                                void *user_ptr,
                                TROVE_context_id context_id,
-                               TROVE_op_id *out_op_id_p)
+                               TROVE_op_id *out_op_id_p,
+                               PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_collection *coll_p = NULL;
@@ -1068,7 +1087,8 @@ static int dbpf_dspace_setattr(TROVE_col
                                TROVE_ds_flags flags,
                                void *user_ptr,
                                TROVE_context_id context_id,
-                               TROVE_op_id *out_op_id_p)
+                               TROVE_op_id *out_op_id_p,
+                               PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_op op;
@@ -1098,8 +1118,17 @@ static int dbpf_dspace_setattr(TROVE_col
         return ret;
     }
 
+    q_op_p->event_type = trove_dbpf_dspace_setattr_event_id;
+    PINT_EVENT_START(q_op_p->event_type,
+                     dbpf_pid, NULL, &q_op_p->event_id,
+                     PINT_HINT_GET_CLIENT_ID(hints),
+                     PINT_HINT_GET_REQUEST_ID(hints),
+                     handle,
+                     PINT_HINT_GET_OP_ID(hints));
+
    /* initialize op-specific members */
     op_p->u.d_setattr.attr_p = ds_attr_p;
+    op_p->hints = hints;
 
     PINT_perf_count(PINT_server_pc, PINT_PERF_METADATA_DSPACE_OPS,
                     1, PINT_PERF_ADD);

Index: dbpf-keyval.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-keyval.c,v
diff -p -u -r1.86 -r1.86.4.1
--- dbpf-keyval.c	4 Mar 2008 00:22:12 -0000	1.86
+++ dbpf-keyval.c	7 Apr 2008 16:31:28 -0000	1.86.4.1
@@ -162,10 +162,11 @@ static int dbpf_keyval_read(TROVE_coll_i
                             TROVE_keyval_s *key_p,
                             TROVE_keyval_s *val_p,
                             TROVE_ds_flags flags,
-                            TROVE_vtag_s *vtag, 
+                            TROVE_vtag_s *vtag,
                             void *user_ptr,
                             TROVE_context_id context_id,
-                            TROVE_op_id *out_op_id_p)
+                            TROVE_op_id *out_op_id_p,
+                            PVFS_hint  hints)
 {
     int ret;
     dbpf_queued_op_t *q_op_p = NULL;
@@ -226,9 +227,19 @@ static int dbpf_keyval_read(TROVE_coll_i
         return ret;
     }
 
+    q_op_p->event_type = trove_dbpf_keyval_read_event_id;
+
+    PINT_EVENT_START(trove_dbpf_keyval_read_event_id,
+                     dbpf_pid, NULL, &q_op_p->event_id,
+                     PINT_HINT_GET_CLIENT_ID(hints),
+                     PINT_HINT_GET_REQUEST_ID(hints),
+                     handle,
+                     PINT_HINT_GET_OP_ID(hints));
+
     /* initialize the op-specific members */
     op_p->u.k_read.key = key_p;
     op_p->u.k_read.val = val_p;
+    op_p->hints = hints;
 
     return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p);
 }
@@ -318,7 +329,8 @@ static int dbpf_keyval_write(TROVE_coll_
                              TROVE_vtag_s *vtag,
                              void *user_ptr,
                              TROVE_context_id context_id,
-                             TROVE_op_id *out_op_id_p)
+                             TROVE_op_id *out_op_id_p,
+                             PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_op op;
@@ -348,9 +360,19 @@ static int dbpf_keyval_write(TROVE_coll_
         return ret;
     }
 
+    q_op_p->event_type = trove_dbpf_keyval_write_event_id;
+
+    PINT_EVENT_START(trove_dbpf_keyval_write_event_id,
+                     dbpf_pid, NULL, &q_op_p->event_id,
+                     PINT_HINT_GET_CLIENT_ID(hints),
+                     PINT_HINT_GET_REQUEST_ID(hints),
+                     handle,
+                     PINT_HINT_GET_OP_ID(hints));
+
    /* initialize the op-specific members */
     op_p->u.k_write.key = *key_p;
     op_p->u.k_write.val = *val_p;
+    op_p->hints = hints;
 
     PINT_perf_count(PINT_server_pc, PINT_PERF_METADATA_KEYVAL_OPS,
                     1, PINT_PERF_ADD);
@@ -516,7 +538,8 @@ static int dbpf_keyval_remove(TROVE_coll
                               TROVE_vtag_s *vtag,
                               void *user_ptr,
                               TROVE_context_id context_id,
-                              TROVE_op_id *out_op_id_p)
+                              TROVE_op_id *out_op_id_p,
+                              PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_op op;
@@ -547,6 +570,7 @@ static int dbpf_keyval_remove(TROVE_coll
     }
 
     /* initialize op-specific members */
+    op_p->hints = hints;
     op_p->u.k_remove.key = *key_p;
     if(val_p)
     {
@@ -602,7 +626,8 @@ static int dbpf_keyval_validate(TROVE_co
                                 TROVE_vtag_s *vtag,
                                 void* user_ptr,
                                 TROVE_context_id context_id,
-                                TROVE_op_id *out_op_id_p)
+                                TROVE_op_id *out_op_id_p,
+                                PVFS_hint  hints)
 {
     return -TROVE_ENOSYS;
 }
@@ -617,7 +642,8 @@ static int dbpf_keyval_iterate(TROVE_col
                                TROVE_vtag_s *vtag,
                                void *user_ptr,
                                TROVE_context_id context_id,
-                               TROVE_op_id *out_op_id_p)
+                               TROVE_op_id *out_op_id_p,
+                               PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_op op;
@@ -652,6 +678,7 @@ static int dbpf_keyval_iterate(TROVE_col
     op_p->u.k_iterate.val_array = val_array;
     op_p->u.k_iterate.position_p = position_p;
     op_p->u.k_iterate.count_p = inout_count_p;
+    op_p->hints = hints;
 
     return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p);
 }
@@ -766,7 +793,8 @@ static int dbpf_keyval_iterate_keys(TROV
                                     TROVE_vtag_s *vtag,
                                     void *user_ptr,
                                     TROVE_context_id context_id,
-                                    TROVE_op_id *out_op_id_p)
+                                    TROVE_op_id *out_op_id_p,
+                                    PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_op op;
@@ -800,6 +828,7 @@ static int dbpf_keyval_iterate_keys(TROV
     op_p->u.k_iterate_keys.key_array = key_array;
     op_p->u.k_iterate_keys.position_p = position_p;
     op_p->u.k_iterate_keys.count_p = inout_count_p;
+    op_p->hints = hints;
 
     return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p);
 }
@@ -894,7 +923,8 @@ static int dbpf_keyval_read_list(TROVE_c
                                  TROVE_vtag_s *vtag,
                                  void *user_ptr,
                                  TROVE_context_id context_id,
-                                 TROVE_op_id *out_op_id_p)
+                                 TROVE_op_id *out_op_id_p,
+                                 PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_op op;
@@ -929,6 +959,7 @@ static int dbpf_keyval_read_list(TROVE_c
     op_p->u.k_read_list.val_array = val_array;
     op_p->u.k_read_list.err_array = err_array;
     op_p->u.k_read_list.count = count;
+    op_p->hints = hints;
 
     return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p);
 }
@@ -998,7 +1029,8 @@ static int dbpf_keyval_write_list(TROVE_
                                   TROVE_vtag_s *vtag,
                                   void *user_ptr,
                                   TROVE_context_id context_id,
-                                  TROVE_op_id *out_op_id_p)
+                                  TROVE_op_id *out_op_id_p,
+                                  PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_op op;
@@ -1032,6 +1064,7 @@ static int dbpf_keyval_write_list(TROVE_
     op_p->u.k_write_list.key_array = key_array;
     op_p->u.k_write_list.val_array = val_array;
     op_p->u.k_write_list.count = count;
+    op_p->hints = hints;
 
     PINT_perf_count(PINT_server_pc, PINT_PERF_METADATA_KEYVAL_OPS,
                     1, PINT_PERF_ADD);
@@ -1170,7 +1203,8 @@ static int dbpf_keyval_flush(TROVE_coll_
                              TROVE_ds_flags flags,
                              void *user_ptr,
                              TROVE_context_id context_id,
-                             TROVE_op_id *out_op_id_p)
+                             TROVE_op_id *out_op_id_p,
+                             PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_op op;
@@ -1183,7 +1217,7 @@ static int dbpf_keyval_flush(TROVE_coll_
     {
         return -TROVE_EINVAL;
     }
-    
+
     ret = dbpf_op_init_queued_or_immediate(
         &op, &q_op_p,
         KEYVAL_FLUSH,
@@ -1199,6 +1233,7 @@ static int dbpf_keyval_flush(TROVE_coll_
     {
         return ret;
     }
+    op_p->hints = hints;
 
     return dbpf_queue_or_service(op_p, q_op_p, coll_p, out_op_id_p);
 }
@@ -1667,7 +1702,8 @@ static int dbpf_keyval_get_handle_info(
     TROVE_keyval_handle_info *info,
     void * user_ptr,
     TROVE_context_id context_id,
-    TROVE_op_id *out_op_id_p)
+    TROVE_op_id *out_op_id_p,
+    PVFS_hint  hints)
 {
     dbpf_queued_op_t *q_op_p = NULL;
     struct dbpf_op op;
@@ -1698,6 +1734,7 @@ static int dbpf_keyval_get_handle_info(
     }
 
     op_p->u.k_get_handle_info.info = info;
+    op_p->hints = hints;
 
     PINT_perf_count(PINT_server_pc, PINT_PERF_METADATA_KEYVAL_OPS,
                     1, PINT_PERF_ADD);

Index: dbpf-mgmt.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-mgmt.c,v
diff -p -u -r1.101 -r1.101.2.1
--- dbpf-mgmt.c	3 Apr 2008 14:48:56 -0000	1.101
+++ dbpf-mgmt.c	7 Apr 2008 16:31:29 -0000	1.101.2.1
@@ -41,6 +41,18 @@
 #include "pint-util.h"
 #include "dbpf-sync.h"
 
+PINT_event_group trove_dbpf_event_group;
+
+PINT_event_type trove_dbpf_read_event_id;
+PINT_event_type trove_dbpf_write_event_id;
+PINT_event_type trove_dbpf_keyval_write_event_id;
+PINT_event_type trove_dbpf_keyval_read_event_id;
+PINT_event_type trove_dbpf_dspace_create_event_id;
+PINT_event_type trove_dbpf_dspace_getattr_event_id;
+PINT_event_type trove_dbpf_dspace_setattr_event_id;
+
+int dbpf_pid;
+
 extern gen_mutex_t dbpf_attr_cache_mutex;
 
 extern int TROVE_db_cache_size_bytes;
@@ -525,6 +537,88 @@ static int dbpf_initialize(char *stoname
 {
     int ret = -TROVE_EINVAL;
     struct dbpf_storage *sto_p = NULL;
+
+    /* initialize events */
+    PINT_event_define_group("trove_dbpf", &trove_dbpf_event_group);
+
+    /* Define the read event:
+     * START:
+     * (client_id, request_id, metafile_handle,
+     *  datafile_handle, op_id, requested_read_size)
+     * STOP: (size_read)
+     */
+    PINT_event_define_event(&trove_dbpf_event_group,
+                            "dbpf_read",
+                            "%d%ld%llu%llu%d%d",
+                            "%llu",
+                            &trove_dbpf_read_event_id);
+
+    /* Define the write event:
+     * START:
+     * (client_id, request_id, metafile-handle, datafile-handle, op_id, write size)
+     * STOP: (size_written)
+     */
+    PINT_event_define_event(&trove_dbpf_event_group,
+                            "dbpf_write",
+                            "%d%ld%llu%llu%d%d",
+                            "%llu",
+                            &trove_dbpf_write_event_id);
+
+    /* Define the keyval read event:
+     * START: (client_id, request_id, metafile-handle, op_id)
+     * STOP: (none)
+     */
+    PINT_event_define_event(&trove_dbpf_event_group,
+                            "dbpf_keyval_read",
+                            "%d%ld%llu%d",
+                            "",
+                            &trove_dbpf_keyval_read_event_id);
+
+    /* Define the keyval write event:
+     * START:
+     * (client_id, request_id, metafile-handle, keyval-handle, op_id)
+     * STOP: (none)
+     */
+    PINT_event_define_event(&trove_dbpf_event_group,
+                            "dbpf_keyval_write",
+                            "%d%ld%llu%llu%d",
+                            "",
+                            &trove_dbpf_keyval_write_event_id);
+
+    /* Define the dspace create event:
+     * START:
+     * (client_id, request_id, op_id)
+     * STOP: (new-handle)
+     */
+    PINT_event_define_event(&trove_dbpf_event_group,
+                            "dbpf_dspace_create",
+                            "%d%ld%llu%d",
+                            "",
+                            &trove_dbpf_dspace_create_event_id);
+
+    /* Define the dspace getattr event:
+     * START:
+     * (client_id, request_id, metafile-handle, op_id)
+     * STOP: (none)
+     */
+    PINT_event_define_event(&trove_dbpf_event_group,
+                            "dbpf_dspace_getattr",
+                            "%d%ld%llu%d",
+                            "",
+                            &trove_dbpf_dspace_getattr_event_id);
+
+    /* Define the dspace setattr event:
+     * START:
+     * (client_id, request_id, metafile-handle, op_id)
+     * STOP: (none)
+     */
+    PINT_event_define_event(&trove_dbpf_event_group,
+                            "dbpf_dspace_setattr",
+                            "%d%ld%llu%d",
+                            "",
+                            &trove_dbpf_dspace_setattr_event_id);
+
+    dbpf_pid = getpid();
 
     if (!stoname)
     {

Index: dbpf-op-queue.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-op-queue.c,v
diff -p -u -r1.33 -r1.33.12.1
--- dbpf-op-queue.c	1 Jun 2007 20:58:05 -0000	1.33
+++ dbpf-op-queue.c	7 Apr 2008 16:31:29 -0000	1.33.12.1
@@ -370,6 +370,7 @@ exit:
 int dbpf_queued_op_complete(dbpf_queued_op_t * qop_p,
                             enum dbpf_op_state state)
 {
+    PINT_EVENT_END(qop_p->event_type, dbpf_pid, NULL, qop_p->event_id);
     DBPF_COMPLETION_START(qop_p, state);
     DBPF_COMPLETION_SIGNAL();
     DBPF_COMPLETION_FINISH(qop_p->op.context_id);

Index: dbpf-op.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-op.h,v
diff -p -u -r1.7 -r1.7.32.1
--- dbpf-op.h	13 Jul 2006 05:11:41 -0000	1.7
+++ dbpf-op.h	7 Apr 2008 16:31:29 -0000	1.7.32.1
@@ -58,6 +58,9 @@ typedef struct
     /* the operation return code after being services */
     TROVE_ds_state state;
 
+    PINT_event_type event_type;
+    PINT_event_id event_id;
+
     struct qlist_head link;
 } dbpf_queued_op_t;
 

Index: dbpf.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf.h,v
diff -p -u -r1.84 -r1.84.2.1
--- dbpf.h	3 Apr 2008 14:48:56 -0000	1.84
+++ dbpf.h	7 Apr 2008 16:31:29 -0000	1.84.2.1
@@ -18,6 +18,7 @@ extern "C" {
 #include "pvfs2-internal.h"
 #include "dbpf-keyval-pcache.h"
 #include "dbpf-open-cache.h"
+#include "pint-event.h"
 
 /* For unknown Berkeley DB errors, we return some large value
  */
@@ -67,13 +68,14 @@ extern "C" {
 #define DBPF_BSTREAM_GET_BUCKET(__handle)                                \
 ((__handle) % DBPF_BSTREAM_MAX_NUM_BUCKETS)
 
-#define DBPF_EVENT_START(__op, __id)                                     \
- PINT_event_timestamp(PVFS_EVENT_API_TROVE, __op, 0, __id,               \
- PVFS_EVENT_FLAG_START)
-
-#define DBPF_EVENT_END(__op, __id)                                       \
- PINT_event_timestamp(PVFS_EVENT_API_TROVE, __op, 0, __id,               \
- PVFS_EVENT_FLAG_END)
+#define DBPF_EVENT_START(event_type, hints, event_id)                   \
+    PINT_EVENT_START(event_type, dbpf_pid, NULL, event_id,              \
+                     PINT_HINT_GET_CLIENT_ID(hints),                    \
+                     PINT_HINT_GET_REQUEST_ID(hints),                   \
+                     PINT_HINT_GET_HANDLE(hints))
+
+#define DBPF_EVENT_END(event_type, event_id)                            \
+    PINT_EVENT_END(event_type, dbpf_pid, NULL, event_id)
 
 #define DBPF_GET_STORAGE_DIRNAME(__buf, __path_max, __stoname)          \
 do { snprintf(__buf, __path_max, "/%s", __stoname); } while (0)
@@ -154,6 +156,18 @@ extern struct TROVE_dspace_ops dbpf_dspa
 extern struct TROVE_keyval_ops dbpf_keyval_ops;
 extern struct TROVE_mgmt_ops dbpf_mgmt_ops;
 
+extern PINT_event_group trove_dbpf_event_group;
+
+extern PINT_event_type trove_dbpf_read_event_id;
+extern PINT_event_type trove_dbpf_write_event_id;
+extern PINT_event_type trove_dbpf_keyval_write_event_id;
+extern PINT_event_type trove_dbpf_keyval_read_event_id;
+extern PINT_event_type trove_dbpf_dspace_create_event_id;
+extern PINT_event_type trove_dbpf_dspace_getattr_event_id;
+extern PINT_event_type trove_dbpf_dspace_setattr_event_id;
+
+extern int dbpf_pid;
+
 struct dbpf_aio_ops
 {
     int (* aio_read) (struct aiocb * aiocbp);
@@ -394,20 +408,21 @@ struct dbpf_bstream_rw_list_op
 
 inline int dbpf_bstream_rw_list(TROVE_coll_id coll_id,
                                 TROVE_handle handle,
-                                char **mem_offset_array, 
+                                char **mem_offset_array,
                                 TROVE_size *mem_size_array,
                                 int mem_count,
                                 TROVE_offset *stream_offset_array,
                                 TROVE_size *stream_size_array,
                                 int stream_count,
                                 TROVE_size *out_size_p,
-                                TROVE_ds_flags flags, 
+                                TROVE_ds_flags flags,
                                 TROVE_vtag_s *vtag,
                                 void *user_ptr,
                                 TROVE_context_id context_id,
                                 TROVE_op_id *out_op_id_p,
                                 int opcode,
-                                struct dbpf_aio_ops * aio_ops);
+                                struct dbpf_aio_ops * aio_ops,
+                                PVFS_hint  hints);
 
 struct dbpf_keyval_get_handle_info_op
 {
@@ -501,6 +516,7 @@ struct dbpf_op
     void *user_ptr;
     TROVE_ds_flags flags;
     TROVE_context_id context_id;
+    PVFS_hint  hints;
     union
     {
         /* all the op types go in here; structs are all
@@ -698,10 +714,11 @@ int dbpf_bstream_read_at(TROVE_coll_id c
                          TROVE_size *inout_size_p,
                          TROVE_offset offset,
                          TROVE_ds_flags flags,
-                         TROVE_vtag_s *vtag, 
+                         TROVE_vtag_s *vtag,
                          void *user_ptr,
                          TROVE_context_id context_id,
-                         TROVE_op_id *out_op_id_p);
+                         TROVE_op_id *out_op_id_p,
+                         PVFS_hint  hints);
 
 int dbpf_bstream_write_at(TROVE_coll_id coll_id,
                           TROVE_handle handle,
@@ -712,7 +729,8 @@ int dbpf_bstream_write_at(TROVE_coll_id 
                           TROVE_vtag_s *vtag,
                           void *user_ptr,
                           TROVE_context_id context_id,
-                          TROVE_op_id *out_op_id_p);
+                          TROVE_op_id *out_op_id_p,
+                          PVFS_hint  hints);
 
 int dbpf_bstream_resize(TROVE_coll_id coll_id,
                         TROVE_handle handle,
@@ -721,7 +739,8 @@ int dbpf_bstream_resize(TROVE_coll_id co
                         TROVE_vtag_s *vtag,
                         void *user_ptr,
                         TROVE_context_id context_id,
-                        TROVE_op_id *out_op_id_p);
+                        TROVE_op_id *out_op_id_p,
+                        PVFS_hint  hints);
 
 int dbpf_bstream_validate(TROVE_coll_id coll_id,
                           TROVE_handle handle,
@@ -729,14 +748,16 @@ int dbpf_bstream_validate(TROVE_coll_id 
                           TROVE_vtag_s *vtag,
                           void *user_ptr,
                           TROVE_context_id context_id,
-                          TROVE_op_id *out_op_id_p);
+                          TROVE_op_id *out_op_id_p,
+                          PVFS_hint  hints);
 
 int dbpf_bstream_flush(TROVE_coll_id coll_id,
                        TROVE_handle handle,
                        TROVE_ds_flags flags,
                        void *user_ptr,
                        TROVE_context_id context_id,
-                       TROVE_op_id *out_op_id_p);
+                       TROVE_op_id *out_op_id_p,
+                       PVFS_hint  hints);
 
 #if defined(__cplusplus)
 }



More information about the Pvfs2-cvs mailing list