trace.h ファイル
目的
IEEE POSIX 1003 が識別するインプリメンテーション・トレースを定義します。
説明
<trace.h> ヘッダーは、以下のメンバーを含む posix_trace_event_info 構造体を定義します。
pid_t posix_pid
void *posix_prog_address
int posix_truncation_status
struct timespec posix_timestamp
pthread_t posix_thread_id
<trace.h> ヘッダーは、以下のメンバーを含む posix_trace_status_info 構造体を定義します。
int posix_stream_full_status
int posix_stream_overrun_status
int posix_stream_flush_status
int posix_stream_flush_error
int posix_log_overrun_status
int posix_log_full_status
| シンボル | 使用法 | 説明 |
|---|---|---|
| POSIX_TRACE_ADD_EVENTSET (POSIX_TRACE_ADD_EVENTSET | how引数posix_trace_set_filter()関数 | フィルターに掛けられるトレース・イベント・タイプの結果セットは、現行セットと、引数セットが指すトレース・イベント・タイプ・セットの和集合です。 |
| POSIX_TRACE_ALL_EVENTS | what引数posix_trace_eventset_fill()関数 | 定義されたすべてのトレース・イベント・タイプ (システムとユーザーの両方) がセットに含まれます。 |
| POSIX_TRACE_APPEND (POSIX_TRACE_APPEND | logpolicy引数posix_trace_attr_setlogfullpolicy()関数 | 関連するトレース・ストリームは、ログ・サイズの制限なしにトレース・ログにフラッシュされます。 |
| 子の POSIX_TRACE_CLOSE_FOR_CHILD | inheritancepolicy引数posix_trace_eventset_fill()関数 | fork () 操作または spawn () 操作の後、子はトレースされず、親のトレースが続行されます。 |
| POSIX_TRACE_FILTER | このイベントは、トレース・イベント・タイプ・フィルターが変更されたときにストリームに記録されます。 |
|
| POSIX_TRACE_FLUSH | streampolicy引数posix_trace_attr_setstreamfullpolicy()関数 | このポリシーは、 posix_trace_flush () 操作が明示的に呼び出されたかのようにトレース・ストリームが定期的にフラッシュされることを除き、POSIX_TRACE_UNTIL_FULL トレース・ストリーム・フル・ポリシーと同じです。 |
| POSIX_TRACE_FLUSH_START | このイベントは、フラッシュ操作の開始をマークするストリームに記録されます。 |
|
| POSIX_TRACE_FLUSH_STOP | このイベントは、フラッシュ操作の終了をマークするストリームに記録されます。 |
|
| POSIX_TRACE_FLUSHING | posix_stream_flush_statusメンバーposix_trace_status_info構造 | トレース・ストリームがトレース・ログにフラッシュされています。 |
| POSIX_TRACE_FULL | posix_stream_full_statusメンバーposix_trace_status_info構造 | トレース・イベント用のトレース・ストリームのスペースはいっぱいです。 |
| POSIX_TRACE_FULL | posix_log_full_statusメンバーposix_trace_status_info構造 | トレース・ログのスペースが使い尽くされました。 |
| POSIX_TRACE_LOOP (POSIX_TRACE_LOOP | streampolicy引数posix_trace_attr_setstreamfullpolicy()関数 | トレース・ストリームは、 posix_trace_stop () サブルーチンが明示的に停止するまでループします。 |
| POSIX_TRACE_LOOP (POSIX_TRACE_LOOP | logpolicy引数posix_trace_attr_setlogfullpolicy()関数 | トレース・ログは、関連するトレース・ストリームが停止するまでループします。 |
| POSIX_TRACE_NO_OVERRUN | posix_stream_overrun_statusメンバーposix_trace_status_info構造 | ストリーム内のトレース・イベントは失われません。 |
| POSIX_TRACE_NO_OVERRUN | posix_log_overrun_statusメンバーposix_trace_status_info構造 | トレース・ログで失われるトレース・イベントはありません。 |
| POSIX_TRACE_NOT_FLUSHING | posix_stream_flush_statusメンバーposix_trace_status_info構造 | 進行中のフラッシュ操作はありません。 |
| POSIX_TRACE_NOT_FULL | posix_stream_full_statusメンバーposix_trace_status_info構造 | トレース・ストリームに使用可能なスペースがあります。 |
| POSIX_TRACE_NOT_FULL | posix_log_full_statusメンバーposix_trace_status_info構造 | トレース・ログに使用可能なスペースがあります。 |
| POSIX トレースが継承されました | inheritancepolicy引数posix_trace_attr_setinherited()関数 | fork () 操作または spawn () 操作の後、親がトレースされると、その子は同じトレース・ストリームを使用して同時にトレースされます。 |
| POSIX_TRACE_NOT_TRUNCATED | posix_truncation_statusメンバーposix_trace_event_info構造 | すべてのトレースされたデータが使用可能です。 |
| POSIX_TRACE_OVERFLOW | このイベントは、トレース・オーバーフロー条件の開始をマークするストリームに記録されます。 |
|
| POSIX_TRACE_OVERRUN | posix_stream_overrun_statusメンバーposix_trace_status_info構造 | 少なくとも 1 つのトレース・イベントが失われ、トレース・ストリームに記録されません。 |
| POSIX_TRACE_OVERRUN | posix_log_overrun_statusメンバーposix_trace_status_info構造 | トレース・ログで少なくとも 1 つのトレース・イベントが失われています。 |
| POSIX_TRACE_RESUME | このイベントは、トレース・オーバーフロー条件の終了をマークするストリームに記録されます。 |
|
| POSIX_TRACE_RUNNING | posix_stream_statusメンバーposix_trace_status_info構造 | トレースが進行中です。 |
| POSIX_TRACE_SET_EVENTSET | how引数posix_trace_set_filter()関数 | フィルタリングされるトレース・イベント・タイプの結果セットは、引数セットが指すトレース・イベント・タイプ・セットです。 |
| POSIX_TRACE_START | このイベントは、トレース開始操作時にストリームに記録されます。 |
|
| POSIX_TRACE_STOP | このイベントは、トレース停止操作時にストリームに記録されます。 |
|
| POSIX_TRACE_SUB_EVENTSET | how引数posix_trace_set_filter()関数 | フィルターに掛けるトレース・イベント・タイプの結果セットには、現行セット内のすべてのトレース・イベント・タイプが含まれます。 これらのトレース・イベント・タイプは、引数セットによって指し示されるセットにはありません。 現在のトレース・イベント・タイプ・セットの各エレメントは、現在のフィルターから削除されます。 |
| POSIX_TRACE_SUSPENDED | posix_stream_statusメンバーposix_trace_status_info構造 | トレース操作が開始されていないか、または停止しています。 |
| POSIX_TRACE_SYSTEM_EVENTS | what引数posix_trace_eventset_fill()関数 | すべてのシステム・トレース・イベント・タイプがセットに含まれています。 |
| POSIX_TRACE_TRUNCATED_READ | posix_truncation_statusメンバーposix_trace_event_info構造 | 読み取りプログラムのバッファーが小さすぎるため、トレース・イベントがトレース・ストリームまたはトレース・ログから読み取られるときにデータが切り捨てられます。 |
| POSIX_TRACE_TRUNCATED_RECORD | posix_truncation_statusメンバーposix_trace_event_info構造 | データは、トレース・イベントの生成時に切り捨てられます。 |
| POSIX_TRACE_UNNAMED_USER_EVENT | トレース・イベントのプロセスごとのユーザー名に達すると、POSIX_TRACE_UNNAMED_USEREVENT ユーザー・トレース・イベントが posix_trace_eventid_open () または posix_trace_trid_eventid_open ()で返されます。 |
|
| POSIX_TRACE_UNTIL_FULL | streampolicy引数posix_trace_attr_getstreamfullpolicy()関数 | トレース・ストリームは、トレース・ストリーム・リソースが使い尽くされるまで実行されます。その後、トレース・ストリームは停止します。 |
| POSIX_TRACE_UNTIL_FULL | logpolicy引数posix_trace_attr_getlogfullpolicy()関数 | トレース・ストリームは、トレース・ログがいっぱいになるまでトレース・ログにフラッシュされます。 |
| POSIX_TRACE_WOPID_EVENTS | what引数posix_trace_eventset_fill()関数 | このセットには、プロセスに依存しないすべてのシステム・トレース・イベント・タイプが含まれています。 |
ヘッダー types.h ファイルで説明されているように、以下のタイプが定義されています。
トレースID型トレースイベントID型
トレースイベント集合型
int posix_trace_attr_getclockres(const trace_attr_t *,
struct timespec *);
int posix_trace_attr_getcreatetime(const trace_attr_t *,
struct timespec *);
int posix_trace_attr_getgenversion(const trace_attr_t *, char *);
int posix_trace_attr_getinherited(const trace_attr_t *restrict,
int *restrict);
int posix_trace_attr_getlogfullpolicy(const trace_attr_t *restrict,
int *restrict);
int posix_trace_attr_getlogsize(const trace_attr_t *restrict,
size_t *restrict);
int posix_trace_attr_getmaxdatasize(const trace_attr_t *restrict,
size_t *restrict);
int posix_trace_attr_getmaxsystemeventsize(const trace_attr_t *restrict,
size_t *restrict);
int posix_trace_attr_getmaxusereventsize(const trace_attr_t *restrict,
size_t, size_t *restrict);
int posix_trace_attr_getname(const trace_attr_t *, char *);
int posix_trace_attr_getstreamfullpolicy(const trace_attr_t *restrict,
int *restrict);
int posix_trace_attr_getstreamsize(const trace_attr_t *restrict,
size_t *restrict);
int posix_trace_attr_init(trace_attr_t *);
int posix_trace_attr_setinherited(trace_attr_t *, int);
int posix_trace_attr_setlogfullpolicy(trace_attr_t *, int);
int posix_trace_attr_setlogsize(trace_attr_t *, size_t);
int posix_trace_attr_setmaxdatasize(trace_attr_t *, size_t);
int posix_trace_attr_setname(trace_attr_t *, const char *);
int posix_trace_attr_setstreamsize(trace_attr_t *, size_t);
int posix_trace_attr_setstreamfullpolicy(trace_attr_t *, int);
int posix_trace_clear(trace_id_t);
int posix_trace_close(trace_id_t);
int posix_trace_create(pid_t, const trace_attr_t *restrict,
trace_id_t *restrict);
int posix_trace_create_withlog(pid_t, const trace_attr_t *restrict,
int, trace_id_t *restrict);
void posix_trace_event(trace_event_id_t, const void *restrict, size_t);
int posix_trace_eventid_equal(trace_id_t, trace_event_id_t,
trace_event_id_t);
int posix_trace_eventid_get_name(trace_id_t, trace_event_id_t, char *);
int posix_trace_eventid_open(const char *restrict,
trace_event_id_t *restrict);
int posix_trace_eventset_add(trace_event_id_t, trace_event_set_t *);
int posix_trace_eventset_del(trace_event_id_t, trace_event_set_t *);
int posix_trace_eventset_empty(trace_event_set_t *);
int posix_trace_eventset_fill(trace_event_set_t *, int);
int posix_trace_eventset_ismember(trace_event_id_t,
const trace_event_set_t *restrict, int *restrict);
int posix_trace_eventtypelist_getnext_id(trace_id_t,
trace_event_id_t *restrict, int *restrict);
int posix_trace_eventtypelist_rewind(trace_id_t);
int posix_trace_flush(trace_id_t);
int posix_trace_get_attr(trace_id_t, trace_attr_t *);
int posix_trace_get_filter(trace_id_t, trace_event_set_t *);
int posix_trace_get_status(trace_id_t,
struct posix_trace_status_info *);
int posix_trace_getnext_event(trace_id_t,
struct posix_trace_event_info *restrict , void *restrict,
size_t, size_t *restrict, int *restrict);
int posix_trace_open(int, trace_id_t *);
int posix_trace_rewind(trace_id_t);
int posix_trace_set_filter(trace_id_t, const trace_event_set_t *, int);
int posix_trace_shutdown(trace_id_t);
int posix_trace_start(trace_id_t);
int posix_trace_stop(trace_id_t);
int posix_trace_timedgetnext_event(trace_id_t,
struct posix_trace_event_info *restrict, void *restrict,
size_t, size_t *restrict, int *restrict,
const struct timespec *restrict);
int posix_trace_trid_eventid_open(trace_id_t, const char *restrict,
trace_event_id_t *restrict);
int posix_trace_trygetnext_event(trace_id_t,
struct posix_trace_event_info *restrict, void *restrict, size_t,
size_t *restrict, int *restrict);