@@ -73,7 +73,7 @@ pgstat_init_function_usage(FunctionCallInfo fcinfo,
73
73
PgStat_FunctionCallUsage * fcu )
74
74
{
75
75
PgStat_EntryRef * entry_ref ;
76
- PgStat_BackendFunctionEntry * pending ;
76
+ PgStat_FunctionCounts * pending ;
77
77
bool created_entry ;
78
78
79
79
if (pgstat_track_functions <= fcinfo -> flinfo -> fn_stats )
@@ -121,10 +121,10 @@ pgstat_init_function_usage(FunctionCallInfo fcinfo,
121
121
122
122
pending = entry_ref -> pending ;
123
123
124
- fcu -> fs = & pending -> f_counts ;
124
+ fcu -> fs = pending ;
125
125
126
126
/* save stats for this function, later used to compensate for recursion */
127
- fcu -> save_f_total_time = pending -> f_counts . f_total_time ;
127
+ fcu -> save_f_total_time = pending -> f_total_time ;
128
128
129
129
/* save current backend-wide total time */
130
130
fcu -> save_total = total_func_time ;
@@ -192,34 +192,34 @@ pgstat_end_function_usage(PgStat_FunctionCallUsage *fcu, bool finalize)
192
192
bool
193
193
pgstat_function_flush_cb (PgStat_EntryRef * entry_ref , bool nowait )
194
194
{
195
- PgStat_BackendFunctionEntry * localent ;
195
+ PgStat_FunctionCounts * localent ;
196
196
PgStatShared_Function * shfuncent ;
197
197
198
- localent = (PgStat_BackendFunctionEntry * ) entry_ref -> pending ;
198
+ localent = (PgStat_FunctionCounts * ) entry_ref -> pending ;
199
199
shfuncent = (PgStatShared_Function * ) entry_ref -> shared_stats ;
200
200
201
201
/* localent always has non-zero content */
202
202
203
203
if (!pgstat_lock_entry (entry_ref , nowait ))
204
204
return false;
205
205
206
- shfuncent -> stats .f_numcalls += localent -> f_counts . f_numcalls ;
206
+ shfuncent -> stats .f_numcalls += localent -> f_numcalls ;
207
207
shfuncent -> stats .f_total_time +=
208
- INSTR_TIME_GET_MICROSEC (localent -> f_counts . f_total_time );
208
+ INSTR_TIME_GET_MICROSEC (localent -> f_total_time );
209
209
shfuncent -> stats .f_self_time +=
210
- INSTR_TIME_GET_MICROSEC (localent -> f_counts . f_self_time );
210
+ INSTR_TIME_GET_MICROSEC (localent -> f_self_time );
211
211
212
212
pgstat_unlock_entry (entry_ref );
213
213
214
214
return true;
215
215
}
216
216
217
217
/*
218
- * find any existing PgStat_BackendFunctionEntry entry for specified function
218
+ * find any existing PgStat_FunctionCounts entry for specified function
219
219
*
220
220
* If no entry, return NULL, don't create a new one
221
221
*/
222
- PgStat_BackendFunctionEntry *
222
+ PgStat_FunctionCounts *
223
223
find_funcstat_entry (Oid func_id )
224
224
{
225
225
PgStat_EntryRef * entry_ref ;
0 commit comments