Commit Graph

416 Commits

Author SHA1 Message Date
Angus Salkeld
8ae2cf4430 TESTS: improve the map tests
- add a iterator to test_map_simple()
- improve the test output

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-13 17:08:19 +10:00
Angus Salkeld
57212c0e94 MAP: add a trie implementation
http://en.wikipedia.org/wiki/Trie

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-12 23:01:15 +10:00
Angus Salkeld
5944229b60 LOG: allow large priorities
They will be printed as trace, it's mainly to make
filtering more flexible

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-09 16:20:54 +10:00
Angus Salkeld
0a1c464514 LOG: add qb_log_filter_ctl2() so we can filter a range of priorities
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-09 14:09:02 +10:00
The Quarterback Library Release Team
c8309edf72 Bump the library version.
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2011-09-09 12:54:03 +10:00
Angus Salkeld
46a8903826 LOG: fix QB_LOG_INIT_DATA
this is weird, but now it actually works

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-09 12:07:57 +10:00
Angus Salkeld
f5fcf2a30b LOG: add a way of getting the target state
This is so we can do the following:

for (t = 0; t < QB_LOG_TARGET_MAX; t++) {
    if (qb_log_ctl(t, QB_LOG_CONF_STATE_GET, 0) == QB_LOG_STATE_ENABLED) {
        // bla bla
    }
}

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-08 16:40:02 +10:00
Angus Salkeld
be8248bd50 LOG: support comma seperated lists of file and function filters
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-08 13:24:18 +10:00
Angus Salkeld
86f004d1ec map: add iterator that does't use a callback
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-07 12:05:15 +10:00
Angus Salkeld
4b594b522d MAP: change the keys from void* to char*
I think this is the most common usage and greatly
simplifies the api.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-07 09:47:49 +10:00
Angus Salkeld
0a50fe57e7 LOG: add facility conversion functions
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-07 09:47:49 +10:00
Angus Salkeld
9df0c32398 LOG: fix the default syslog filter
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-09-01 13:51:06 +10:00
Angus Salkeld
2b7edd508d defs: better define va_copy
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-26 09:39:26 +10:00
Angus Salkeld
8c98054bfa Fix "./check dist"
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-26 09:37:25 +10:00
Angus Salkeld
564d3281ef hashtable: Fix a lint warning
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-25 22:22:09 +10:00
Angus Salkeld
e1be00130c LOG: fix ansi build
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-22 14:11:43 +10:00
Angus Salkeld
94767b18b8 Initial map using either a skiplist or a hashtable
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-22 14:11:43 +10:00
Angus Salkeld
8f954cd115 Add a stop watch
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-22 13:28:15 +10:00
Angus Salkeld
835eefeff8 docs: add utils to the mainpage
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-22 13:27:51 +10:00
Angus Salkeld
1591075873 LOG: serialize the va_list, don't snprintf
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-22 10:29:48 +10:00
Angus Salkeld
523922b202 LOG: change active list into array access
just keep track of the max used targets

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-19 12:44:37 +10:00
Angus Salkeld
96f5fad67b TEST: add int arguments to log bench
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-19 12:04:50 +10:00
Angus Salkeld
e3b167819c atomic: fix qb_atomic_pointer macros
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-19 10:21:02 +10:00
Angus Salkeld
ea8dfea7a0 LOG: allow the thread priority to be set.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-08-07 22:37:42 +10:00
Angus Salkeld
453dd31431 Fix splint warning on ubuntu 11.04
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-07-19 14:08:57 +10:00
The Quarterback Library Release Team
e910830b26 Make sure write_logs.c is deleted by "make distclean"
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2011-07-18 10:06:52 +10:00
Angus Salkeld
c41113aaec LOG: move priority check up to prevent unnecessary format.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-07-14 12:38:02 +10:00
Angus Salkeld
bb1140fbd9 Add a qb_strerror_r wrapper.
This is to make the calling code more portable

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-07-14 10:41:46 +10:00
Angus Salkeld
5b8e00ba06 Remove TODO from dist_doc_DATA
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-07-14 10:40:43 +10:00
Angus Salkeld
c21feaabbe Delete TODO (use github issues)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-07-13 12:29:28 +10:00
Angus Salkeld
9999317617 Add some more content to the README
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-07-13 11:34:03 +10:00
Angus Salkeld
638f75dbc5 LOG: add string.h to qblog.h
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-07-13 10:31:17 +10:00
Angus Salkeld
f4e2705e95 LOG: use strerror_r instead of strerror in qb_perror()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-27 15:57:51 +10:00
Angus Salkeld
dc278798a3 TEST: bump up the logging timeout
This was failing on sparcv9, but seems to just be a slow machine.
With a bigger timeout it passes.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-27 09:34:07 +10:00
Angus Salkeld
0cb84fcda2 configure: improve arch & os detection output.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-26 23:29:19 +10:00
Angus Salkeld
b8fbeb3d4b LOG: fix alignment compiler warning on sparc
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-26 23:23:42 +10:00
Angus Salkeld
478e00b2c0 Revert "LOG: use uint8_t for pointer manipulation"
This reverts commit a47ae0b659.
2011-06-26 19:08:15 +10:00
Jim Meyering
876dc70ce2 don't let an invalid time stamp provoke a NULL dereference
* lib/log_blackbox.c (qb_log_blackbox_print_from_file): Handle
localtime failure by printing the long-int representation rather
than a strftime-formatted one.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-26 18:58:56 +10:00
Angus Salkeld
93a0506d69 Fix references to README
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-23 14:46:36 +10:00
Angus Salkeld
323c6b8acc Change README into markdown to look better on github
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-23 10:08:46 +10:00
Angus Salkeld
98493d9ae8 Change Lindent options to break the procedure type.
so change:
int foo(void)

to

int
foo(void)

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-22 14:19:14 +10:00
Angus Salkeld
001b4a078c LOOP: make the return more consistent in qb_loop_timer_expire_time_get()
If there is any error return 0
 (meaning the timer is or has expired)

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-22 13:13:34 +10:00
Angus Salkeld
a47ae0b659 LOG: use uint8_t for pointer manipulation
char changes size on different arches.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-21 09:02:35 +10:00
Angus Salkeld
42e79dfd2f IPC: use the correct pointer type.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-20 16:36:34 +10:00
Angus Salkeld
77b6e15a85 Consistently prepend "qb-" to files in /dev/shm
Dietmar: can you confirm this works for you?

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-20 16:36:26 +10:00
The Quarterback Library Release Team
a69482ade6 Update the library version to 0.5.0
Signed-off-by: The Quarterback Library Release Team <quarterback-devel@fedorahosted.org>
2011-06-07 21:11:58 +10:00
Angus Salkeld
79b75b3428 check: Change -s to --no-print-directory
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-07 19:53:55 +10:00
Angus Salkeld
4a3536e72c Re-fix mmap() woes on sparc.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-07 19:53:26 +10:00
Angus Salkeld
34e9820230 Revert "Fix ringbuffer creation on sparc"
This reverts commit 683296f180.
2011-06-03 22:43:09 +10:00
Angus Salkeld
683296f180 Fix ringbuffer creation on sparc
On the first call to qb_rb_open() we try using a number of
page sizes. This because the system might have CONFIG_HUGETLB_PAGE_SIZE
defined in their kernel. So even though sysconf() returns 2K or 4K
some arch's mmap() require alignment on these boundaries.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2011-06-02 11:42:14 +10:00