Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6eb1f14f
Commit
6eb1f14f
authored
Sep 05, 2007
by
Bradley C. Kuszmaul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
txn_stat btree-stat
git-svn-id:
file:///svn/tokudb@266
c7de825b-a66e-492c-adef-691d508d4ae1
parent
6c3438a1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
38 deletions
+77
-38
buildheader/make_db_h.c
buildheader/make_db_h.c
+14
-0
buildheader/sample_offsets.c
buildheader/sample_offsets.c
+19
-4
buildheader/sample_offsets_32.h
buildheader/sample_offsets_32.h
+44
-34
No files found.
buildheader/make_db_h.c
View file @
6eb1f14f
...
...
@@ -121,6 +121,20 @@ int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__un
assert
(
sizeof
(
db_env_fields32
)
==
sizeof
(
db_env_fields64
));
print_struct
(
"db_env"
,
1
,
db_env_fields32
,
db_env_fields64
,
sizeof
(
db_env_fields32
)
/
sizeof
(
db_env_fields32
[
0
]));
assert
(
sizeof
(
db_key_range_fields32
)
==
sizeof
(
db_key_range_fields64
));
print_struct
(
"db_key_range"
,
0
,
db_key_range_fields32
,
db_key_range_fields64
,
sizeof
(
db_key_range_fields32
)
/
sizeof
(
db_key_range_fields32
[
0
]));
assert
(
sizeof
(
db_lsn_fields32
)
==
sizeof
(
db_lsn_fields64
));
print_struct
(
"db_lsn"
,
0
,
db_lsn_fields32
,
db_lsn_fields64
,
sizeof
(
db_lsn_fields32
)
/
sizeof
(
db_lsn_fields32
[
0
]));
assert
(
sizeof
(
db_txn_active_fields32
)
==
sizeof
(
db_txn_active_fields64
));
print_struct
(
"db_txn_active"
,
0
,
db_txn_active_fields32
,
db_txn_active_fields64
,
sizeof
(
db_txn_active_fields32
)
/
sizeof
(
db_txn_active_fields32
[
0
]));
assert
(
sizeof
(
db_txn_stat_fields32
)
==
sizeof
(
db_txn_stat_fields64
));
print_struct
(
"db_txn_stat"
,
0
,
db_txn_stat_fields32
,
db_txn_stat_fields64
,
sizeof
(
db_txn_stat_fields32
)
/
sizeof
(
db_txn_stat_fields32
[
0
]));
assert
(
sizeof
(
db_btree_stat_fields32
)
==
sizeof
(
db_btree_stat_fields64
));
print_struct
(
"db_btree_stat"
,
0
,
db_btree_stat_fields32
,
db_btree_stat_fields64
,
sizeof
(
db_btree_stat_fields32
)
/
sizeof
(
db_btree_stat_fields32
[
0
]));
printf
(
"#if defined(__cplusplus)
\n
}
\n
#endif
\n
"
);
printf
(
"#endif
\n
"
);
return
0
;
...
...
buildheader/sample_offsets.c
View file @
6eb1f14f
...
...
@@ -140,16 +140,31 @@ void sample_db_txn_active_offsets (void) {
sort_and_dump_fields
(
"db_txn_active"
,
sizeof
(
DB_TXN_ACTIVE
));
}
void
sample_db_txn_stat_offsets
(
void
)
{
field_counter
=
0
;
STRUCT_SETUP
(
DB_TXN_STAT
,
st_nactive
,
"u_int32_t %s"
);
STRUCT_SETUP
(
DB_TXN_STAT
,
st_txnarray
,
"DB_TXN_ACTIVE *%s"
);
sort_and_dump_fields
(
"db_txn_stat"
,
sizeof
(
DB_TXN_STAT
));
}
void
sample_db_btree_stat_offsets
(
void
)
{
field_counter
=
0
;
STRUCT_SETUP
(
DB_BTREE_STAT
,
bt_ndata
,
"u_int32_t %s"
);
STRUCT_SETUP
(
DB_BTREE_STAT
,
bt_nkeys
,
"u_int32_t %s"
);
sort_and_dump_fields
(
"db_btree_stat"
,
sizeof
(
DB_BTREE_STAT
));
}
int
main
(
int
argc
__attribute__
((
__unused__
)),
char
*
argv
[]
__attribute__
((
__unused__
)))
{
open_file
();
fprintf
(
outf
,
"/* BDB offsets on a %d-bit machine */
\n
"
,
__WORDSIZE
);
sample_db_offsets
();
sample_dbt_offsets
();
sample_db_txn_offsets
();
sample_dbc_offsets
();
sample_db_btree_stat_offsets
();
sample_db_env_offsets
();
sample_db_key_range_offsets
();
sample_db_lsn_offsets
();
sample_db_offsets
();
sample_db_txn_active_offsets
();
sample_db_txn_offsets
();
sample_db_txn_stat_offsets
();
sample_dbc_offsets
();
sample_dbt_offsets
();
return
0
;
}
buildheader/sample_offsets_32.h
View file @
6eb1f14f
/* BDB offsets on a 32-bit machine */
struct
fieldinfo
db_fields32
[]
=
{
{
"void *app_private"
,
16
,
4
},
{
"int (*close) (DB*, u_int32_t)"
,
272
,
4
},
{
"int (*cursor) (DB *, DB_TXN *, DBC **, u_int32_t)"
,
276
,
4
},
{
"int (*del) (DB *, DB_TXN *, DBT *, u_int32_t)"
,
280
,
4
},
{
"int (*get) (DB *, DB_TXN *, DBT *, DBT *, u_int32_t)"
,
296
,
4
},
{
"int (*key_range) (DB *, DB_TXN *, DBT *, DB_KEY_RANGE *, u_int32_t)"
,
316
,
4
},
{
"int (*open) (DB *, DB_TXN *, const char *, const char *, DBTYPE, u_int32_t, int)"
,
320
,
4
},
{
"int (*put) (DB *, DB_TXN *, DBT *, DBT *, u_int32_t)"
,
324
,
4
},
{
"int (*remove) (DB *, const char *, const char *, u_int32_t)"
,
328
,
4
},
{
"int (*rename) (DB *, const char *, const char *, const char *, u_int32_t)"
,
332
,
4
},
{
"int (*set_flags) (DB *, u_int32_t)"
,
380
,
4
},
{
"int (*stat) (DB *, void *, u_int32_t)"
,
396
,
4
},
{
"int (*set_bt_compare) (DB *, int (*)(DB *, const DBT *, const DBT *))"
,
412
,
4
},
{
0
,
484
,
484
}
/* size of whole struct */
};
struct
fieldinfo
dbt_fields32
[]
=
{
{
"void*data"
,
0
,
4
},
{
"u_int32_t size"
,
4
,
4
},
{
"u_int32_t ulen"
,
8
,
4
},
{
"void*app_private"
,
20
,
4
},
{
"u_int32_t flags"
,
24
,
4
},
{
0
,
28
,
28
}
/* size of whole struct */
};
struct
fieldinfo
db_txn_fields32
[]
=
{
{
"int (*commit) (DB_TXN*, u_int32_t)"
,
80
,
4
},
{
"u_int32_t (*id) (DB_TXN *)"
,
88
,
4
},
{
0
,
104
,
104
}
/* size of whole struct */
};
struct
fieldinfo
dbc_fields32
[]
=
{
{
"int (*c_close) (DBC *)"
,
204
,
4
},
{
"int (*c_del) (DBC *, u_int32_t)"
,
212
,
4
},
{
"int (*c_get) (DBC *, DBT *, DBT *, u_int32_t)"
,
220
,
4
},
{
0
,
268
,
268
}
/* size of whole struct */
struct
fieldinfo
db_btree_stat_fields32
[]
=
{
{
"u_int32_t bt_nkeys"
,
12
,
4
},
{
"u_int32_t bt_ndata"
,
16
,
4
},
{
0
,
80
,
80
}
/* size of whole struct */
};
struct
fieldinfo
db_env_fields32
[]
=
{
{
"int (*close) (DB_ENV *, u_int32_t)"
,
248
,
4
},
...
...
@@ -67,8 +37,48 @@ struct fieldinfo db_key_range_fields32[] = {
struct
fieldinfo
db_lsn_fields32
[]
=
{
{
0
,
8
,
8
}
/* size of whole struct */
};
struct
fieldinfo
db_fields32
[]
=
{
{
"void *app_private"
,
16
,
4
},
{
"int (*close) (DB*, u_int32_t)"
,
272
,
4
},
{
"int (*cursor) (DB *, DB_TXN *, DBC **, u_int32_t)"
,
276
,
4
},
{
"int (*del) (DB *, DB_TXN *, DBT *, u_int32_t)"
,
280
,
4
},
{
"int (*get) (DB *, DB_TXN *, DBT *, DBT *, u_int32_t)"
,
296
,
4
},
{
"int (*key_range) (DB *, DB_TXN *, DBT *, DB_KEY_RANGE *, u_int32_t)"
,
316
,
4
},
{
"int (*open) (DB *, DB_TXN *, const char *, const char *, DBTYPE, u_int32_t, int)"
,
320
,
4
},
{
"int (*put) (DB *, DB_TXN *, DBT *, DBT *, u_int32_t)"
,
324
,
4
},
{
"int (*remove) (DB *, const char *, const char *, u_int32_t)"
,
328
,
4
},
{
"int (*rename) (DB *, const char *, const char *, const char *, u_int32_t)"
,
332
,
4
},
{
"int (*set_flags) (DB *, u_int32_t)"
,
380
,
4
},
{
"int (*stat) (DB *, void *, u_int32_t)"
,
396
,
4
},
{
"int (*set_bt_compare) (DB *, int (*)(DB *, const DBT *, const DBT *))"
,
412
,
4
},
{
0
,
484
,
484
}
/* size of whole struct */
};
struct
fieldinfo
db_txn_active_fields32
[]
=
{
{
"u_int32_t txnid"
,
0
,
4
},
{
"DB_LSN lsn"
,
8
,
8
},
{
0
,
16
,
16
}
/* size of whole struct */
};
struct
fieldinfo
db_txn_fields32
[]
=
{
{
"int (*commit) (DB_TXN*, u_int32_t)"
,
80
,
4
},
{
"u_int32_t (*id) (DB_TXN *)"
,
88
,
4
},
{
0
,
104
,
104
}
/* size of whole struct */
};
struct
fieldinfo
db_txn_stat_fields32
[]
=
{
{
"u_int32_t st_nactive"
,
32
,
4
},
{
"DB_TXN_ACTIVE *st_txnarray"
,
44
,
4
},
{
0
,
60
,
60
}
/* size of whole struct */
};
struct
fieldinfo
dbc_fields32
[]
=
{
{
"int (*c_close) (DBC *)"
,
204
,
4
},
{
"int (*c_del) (DBC *, u_int32_t)"
,
212
,
4
},
{
"int (*c_get) (DBC *, DBT *, DBT *, u_int32_t)"
,
220
,
4
},
{
0
,
268
,
268
}
/* size of whole struct */
};
struct
fieldinfo
dbt_fields32
[]
=
{
{
"void*data"
,
0
,
4
},
{
"u_int32_t size"
,
4
,
4
},
{
"u_int32_t ulen"
,
8
,
4
},
{
"void*app_private"
,
20
,
4
},
{
"u_int32_t flags"
,
24
,
4
},
{
0
,
28
,
28
}
/* size of whole struct */
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment