Use .obs extension for ovni binary streams
This commit is contained in:
parent
0746d2a0ec
commit
8727126551
@ -31,6 +31,8 @@ typedef struct json_value_t JSON_Value;
|
|||||||
#define OVNI_STREAM_VERSION 1
|
#define OVNI_STREAM_VERSION 1
|
||||||
#define OVNI_MODEL_VERSION "O1 V1 T1 M1 D1 K1 61"
|
#define OVNI_MODEL_VERSION "O1 V1 T1 M1 D1 K1 61"
|
||||||
|
|
||||||
|
#define OVNI_STREAM_EXT ".obs"
|
||||||
|
|
||||||
/* Follow https://semver.org rules for versioning */
|
/* Follow https://semver.org rules for versioning */
|
||||||
#define OVNI_LIB_VERSION "1.0.0"
|
#define OVNI_LIB_VERSION "1.0.0"
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ cb_nftw(const char *fpath, const struct stat *sb,
|
|||||||
if (typeflag != FTW_F)
|
if (typeflag != FTW_F)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!has_suffix(fpath, ".ovnistream"))
|
if (!has_suffix(fpath, OVNI_STREAM_EXT))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return load_stream(cur_trace, fpath);
|
return load_stream(cur_trace, fpath);
|
||||||
|
@ -61,12 +61,12 @@ create_trace_stream(void)
|
|||||||
{
|
{
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
|
|
||||||
int written = snprintf(path, PATH_MAX, "%s/thread.%d.ovnistream",
|
int written = snprintf(path, PATH_MAX, "%s/thread.%d%s",
|
||||||
rproc.procdir, rthread.tid);
|
rproc.procdir, rthread.tid, OVNI_STREAM_EXT);
|
||||||
|
|
||||||
if (written >= PATH_MAX)
|
if (written >= PATH_MAX)
|
||||||
die("thread trace path too long: %s/thread.%d.ovnistream\n",
|
die("thread trace path too long: %s/thread.%d%s\n",
|
||||||
rproc.procdir, rthread.tid);
|
rproc.procdir, rthread.tid, OVNI_STREAM_EXT);
|
||||||
|
|
||||||
rthread.streamfd = open(path, O_WRONLY | O_CREAT, 0644);
|
rthread.streamfd = open(path, O_WRONLY | O_CREAT, 0644);
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ test_oversubscription(void)
|
|||||||
|
|
||||||
struct thread th0, th1;
|
struct thread th0, th1;
|
||||||
|
|
||||||
if (thread_init_begin(&th0, &proc, "loom.0/proc.0/thread.0.ovnistream") != 0)
|
if (thread_init_begin(&th0, &proc, "loom.0/proc.0/thread.0.obs") != 0)
|
||||||
die("thread_init_begin failed");
|
die("thread_init_begin failed");
|
||||||
|
|
||||||
thread_set_gindex(&th0, 0);
|
thread_set_gindex(&th0, 0);
|
||||||
@ -37,7 +37,7 @@ test_oversubscription(void)
|
|||||||
if (thread_init_end(&th0) != 0)
|
if (thread_init_end(&th0) != 0)
|
||||||
die("thread_init_end failed");
|
die("thread_init_end failed");
|
||||||
|
|
||||||
if (thread_init_begin(&th1, &proc, "loom.1/proc.1/thread.1.ovnistream") != 0)
|
if (thread_init_begin(&th1, &proc, "loom.1/proc.1/thread.1.obs") != 0)
|
||||||
die("thread_init_begin failed");
|
die("thread_init_begin failed");
|
||||||
|
|
||||||
thread_set_gindex(&th1, 1);
|
thread_set_gindex(&th1, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user