diff options
author | Jerome Soumagne <jsoumagne@hdfgroup.org> | 2019-07-16 16:15:43 (GMT) |
---|---|---|
committer | Jerome Soumagne <jsoumagne@hdfgroup.org> | 2019-10-08 20:19:21 (GMT) |
commit | dabdcf95593aa97185c83006f35a0849ea012450 (patch) | |
tree | d8e20aa27fb16271e9ef355694475ca2c4437ff5 /src/H5trace.c | |
parent | e9570c198b7950dd7459cd005068d772b33c7fd4 (diff) | |
download | hdf5-dabdcf95593aa97185c83006f35a0849ea012450.zip hdf5-dabdcf95593aa97185c83006f35a0849ea012450.tar.gz hdf5-dabdcf95593aa97185c83006f35a0849ea012450.tar.bz2 |
Add new H5R API that abstracts object, region and attribute reference types
Also support references to external files
Add new H5T_REF type and type conversion routines
Support conversion from H5T_REF_OBJ/DSET_REG to H5T_REF
Add H5Treclaim() API to reclaim memory of vlen/reference types
Deprecate H5Dvlen_reclaim()
Fix H5T_vlen_reclaim() and H5T_reclaim() to use private callback
Add H5T_ref_reclaim()
Move previous H5R APIs to H5Rdeprec.c
Clean up H5Ocopy
Separate H5O_copy_expand_ref() to H5Ocopy_ref()
Add support for copying new reference types
Clean up deprecated routines to go through VOL and same code path
Fix return codes in existing trefer.c test
Rename trefer.c to trefer_deprec.c
trefer.c is for new references
Add performance test for trefer
Add additional obj_copy_ref test
Make use of tokens and blobs to store references
Skip blob encoding for object references
Start adding new reference examples
Diffstat (limited to 'src/H5trace.c')
-rw-r--r-- | src/H5trace.c | 78 |
1 files changed, 60 insertions, 18 deletions
diff --git a/src/H5trace.c b/src/H5trace.c index 2099383..2f40686 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -34,6 +34,7 @@ #include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5FDprivate.h" /* File drivers */ +#include "H5Rprivate.h" /* References */ #include "H5Ipkg.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5VLprivate.h" /* Virtual Object Layer */ @@ -1852,22 +1853,51 @@ H5_trace(const double *returning, const char *func, const char *type, ...) } /* end else */ break; - case 'r': - if(ptr) { - if(vp) - HDfprintf(out, "0x%lx", (unsigned long)vp); - else - HDfprintf(out, "NULL"); - } /* end if */ - else { - hobj_ref_t ref = HDva_arg(ap, hobj_ref_t); - - HDfprintf(out, "Reference Object=%a", ref); - } /* end else */ - break; - case 'R': switch(type[1]) { + + case 'o': + if(ptr) { + if(vp) + HDfprintf(out, "0x%lx", (unsigned long)vp); + else + HDfprintf(out, "NULL"); + } /* end if */ + else { + hobj_ref_t ref = HDva_arg(ap, hobj_ref_t); + + HDfprintf(out, "Reference Object=%a", ref); + } /* end else */ + break; + + case 'd': + if(ptr) { + if(vp) + HDfprintf(out, "0x%lx", (unsigned long)vp); + else + HDfprintf(out, "NULL"); + } /* end if */ + else { + /* Note! region references are array types */ + HDfprintf(out, "Reference Region"); + goto error; + } /* end else */ + break; + + case 'r': + if(ptr) { + if(vp) + HDfprintf(out, "0x%lx", (unsigned long)vp); + else + HDfprintf(out, "NULL"); + } /* end if */ + else { + /* Note! reference types are opaque types */ + HDfprintf(out, "Reference Opaque"); + goto error; + } /* end else */ + break; + case 't': if(ptr) { if(vp) @@ -1883,12 +1913,24 @@ H5_trace(const double *returning, const char *func, const char *type, ...) HDfprintf(out, "H5R_BADTYPE"); break; - case H5R_OBJECT: - HDfprintf(out, "H5R_OBJECT"); + case H5R_OBJECT1: + HDfprintf(out, "H5R_OBJECT1"); + break; + + case H5R_DATASET_REGION1: + HDfprintf(out, "H5R_DATASET_REGION1"); + break; + + case H5R_OBJECT2: + HDfprintf(out, "H5R_OBJECT2"); + break; + + case H5R_DATASET_REGION2: + HDfprintf(out, "H5R_DATASET_REGION2"); break; - case H5R_DATASET_REGION: - HDfprintf(out, "H5R_DATASET_REGION"); + case H5R_ATTR: + HDfprintf(out, "H5R_ATTR"); break; case H5R_MAXTYPE: |