Playing with pahole.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4756 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2024-01-11 01:38:30 +00:00
parent 9e5e7b70d4
commit 74eb74deb1
7 changed files with 19 additions and 20 deletions

View File

@ -33,8 +33,8 @@ typedef struct file_stat_t {
typedef struct fs_req_t { typedef struct fs_req_t {
uv_fs_t fs; uv_fs_t fs;
uv_file file;
size_t size; size_t size;
uv_file file;
char buffer[]; char buffer[];
} fs_req_t; } fs_req_t;

View File

@ -102,11 +102,11 @@ typedef struct _tf_ssb_debug_close_t
typedef struct _tf_ssb_request_t typedef struct _tf_ssb_request_t
{ {
int32_t request_number;
tf_ssb_rpc_callback_t* callback; tf_ssb_rpc_callback_t* callback;
tf_ssb_callback_cleanup_t* cleanup; tf_ssb_callback_cleanup_t* cleanup;
void* user_data; void* user_data;
tf_ssb_connection_t* dependent_connection; tf_ssb_connection_t* dependent_connection;
int32_t request_number;
} tf_ssb_request_t; } tf_ssb_request_t;
typedef struct _tf_ssb_broadcast_t typedef struct _tf_ssb_broadcast_t
@ -252,8 +252,8 @@ typedef struct _tf_ssb_t
typedef struct _tf_ssb_connection_message_request_t typedef struct _tf_ssb_connection_message_request_t
{ {
char author[k_id_base64_len];
int32_t request_number; int32_t request_number;
char author[k_id_base64_len];
bool keys; bool keys;
} tf_ssb_connection_message_request_t; } tf_ssb_connection_message_request_t;
@ -3553,12 +3553,11 @@ tf_ssb_blob_wants_t* tf_ssb_connection_get_blob_wants_state(tf_ssb_connection_t*
typedef struct _store_t typedef struct _store_t
{ {
tf_ssb_t* ssb; tf_ssb_t* ssb;
tf_ssb_verify_strip_store_callback_t* callback;
void* user_data;
bool verified; bool verified;
bool stored; bool stored;
char id[crypto_hash_sha256_BYTES * 2 + 1]; char id[crypto_hash_sha256_BYTES * 2 + 1];
tf_ssb_verify_strip_store_callback_t* callback;
void* user_data;
} store_t; } store_t;
static void _tf_ssb_verify_strip_and_store_finish(store_t* store) static void _tf_ssb_verify_strip_and_store_finish(store_t* store)

View File

@ -50,11 +50,11 @@ JSValue tf_ssb_format_message(
typedef struct _tf_ssb_following_t typedef struct _tf_ssb_following_t
{ {
char id[k_id_base64_len];
int following_count; int following_count;
int blocking_count; int blocking_count;
int followed_by_count; int followed_by_count;
int blocked_by_count; int blocked_by_count;
char id[k_id_base64_len];
} tf_ssb_following_t; } tf_ssb_following_t;
const char** tf_ssb_db_following_deep_ids(tf_ssb_t* ssb, const char** ids, int count, int depth); const char** tf_ssb_db_following_deep_ids(tf_ssb_t* ssb, const char** ids, int count, int depth);

View File

@ -67,15 +67,15 @@ typedef struct _tf_ssb_stats_t
typedef struct _tf_ssb_blob_wants_t typedef struct _tf_ssb_blob_wants_t
{ {
int32_t request_number; int32_t request_number;
char last_id[k_blob_id_len];
int wants_sent; int wants_sent;
char last_id[k_blob_id_len];
} tf_ssb_blob_wants_t; } tf_ssb_blob_wants_t;
typedef struct _tf_ssb_store_queue_t typedef struct _tf_ssb_store_queue_t
{ {
bool running;
void* head; void* head;
void* tail; void* tail;
bool running;
} tf_ssb_store_queue_t; } tf_ssb_store_queue_t;
tf_ssb_t* tf_ssb_create(uv_loop_t* loop, JSContext* context, const char* db_path); tf_ssb_t* tf_ssb_create(uv_loop_t* loop, JSContext* context, const char* db_path);

View File

@ -599,21 +599,21 @@ static JSValue _tf_ssb_closeConnection(JSContext* context, JSValueConst this_val
typedef struct _sql_work_t typedef struct _sql_work_t
{ {
tf_ssb_t* ssb;
sqlite3* db;
char* error;
const char* query;
uint8_t* binds;
uint8_t* rows;
size_t binds_count;
size_t rows_count;
uv_work_t request; uv_work_t request;
uv_async_t async; uv_async_t async;
uv_timer_t timeout; uv_timer_t timeout;
tf_ssb_t* ssb;
sqlite3* db;
uv_mutex_t lock; uv_mutex_t lock;
const char* query;
uint8_t* binds;
size_t binds_count;
uint8_t* rows;
size_t rows_count;
JSValue callback; JSValue callback;
JSValue promise[2]; JSValue promise[2];
int result; int result;
char* error;
} sql_work_t; } sql_work_t;
static void _tf_ssb_sql_append(uint8_t** rows, size_t* rows_count, const void* data, size_t size) static void _tf_ssb_sql_append(uint8_t** rows, size_t* rows_count, const void* data, size_t size)

View File

@ -711,9 +711,9 @@ typedef struct _close_t
{ {
tf_ssb_t* ssb; tf_ssb_t* ssb;
tf_ssb_connection_t* connection; tf_ssb_connection_t* connection;
char id[k_id_base64_len];
int32_t request_number;
uv_timer_t timer; uv_timer_t timer;
int32_t request_number;
char id[k_id_base64_len];
} close_t; } close_t;
static void _timer_close(uv_handle_t* handle) static void _timer_close(uv_handle_t* handle)

View File

@ -71,10 +71,10 @@ typedef struct _promise_t
typedef struct _promise_stack_t typedef struct _promise_stack_t
{ {
uint32_t hash; uint32_t hash;
int count;
const char* stack; const char* stack;
void* cstack[32]; void* cstack[32];
int cstack_count; int cstack_count;
int count;
} promise_stack_t; } promise_stack_t;
typedef struct _hitch_t typedef struct _hitch_t