Skip to content

Commit

Permalink
Some log improvements about image ID
Browse files Browse the repository at this point in the history
While investigating issues due to asynchronous flow of the pixelpipes one problem was to be sure
what image we are working on. Adding the id or filename to every output would surely be an overkill,
preparing the pixelpipe out & in rois and when pipe has finished are enough.
  • Loading branch information
jenshannoschwalm authored and TurboGit committed May 26, 2024
1 parent e786a09 commit da98437
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions src/develop/pixelpipe_hb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,8 @@ static gboolean _dev_pixelpipe_process_rec(
module->modify_roi_in(module, piece, roi_out, &roi_in);
if((darktable.unmuted & DT_DEBUG_PIPE) && memcmp(roi_out, &roi_in, sizeof(dt_iop_roi_t)))
dt_print_pipe(DT_DEBUG_PIPE,
"modify roi IN", piece->pipe, module, DT_DEVICE_NONE, &roi_in, roi_out, "\n");
"modify roi IN", piece->pipe, module, DT_DEVICE_NONE, &roi_in, roi_out, "ID=%i\n",
pipe->image.id);
// recurse to get actual data of input buffer

dt_iop_buffer_dsc_t _input_format = { 0 };
Expand Down Expand Up @@ -2606,12 +2607,12 @@ gboolean dt_dev_pixelpipe_process(

#ifdef HAVE_OPENCL
if(pipe->devid > DT_DEVICE_CPU)
dt_print_pipe(DT_DEBUG_PIPE, "pipe starting", pipe, NULL, pipe->devid, &roi, &roi, "ID %i, %s\n",
dt_print_pipe(DT_DEBUG_PIPE, "pipe starting", pipe, NULL, pipe->devid, &roi, &roi, "ID=%i, %s\n",
pipe->image.id,
darktable.opencl->dev[pipe->devid].cname);
else
#endif
dt_print_pipe(DT_DEBUG_PIPE, "pipe starting", pipe, NULL, pipe->devid, &roi, &roi, "ID %i\n",
dt_print_pipe(DT_DEBUG_PIPE, "pipe starting", pipe, NULL, pipe->devid, &roi, &roi, "ID=%i\n",
pipe->image.id);

// run pixelpipe recursively and get error status
Expand Down Expand Up @@ -2667,7 +2668,8 @@ gboolean dt_dev_pixelpipe_process(
dt_dev_pixelpipe_change(pipe, dev);

dt_print_pipe(DT_DEBUG_PIPE | DT_DEBUG_OPENCL,
"pipe restarting on CPU", pipe, NULL, old_devid, &roi, &roi, "\n");
"pipe restarting on CPU", pipe, NULL, old_devid, &roi, &roi, "ID=%i\n",
pipe->image.id);

goto restart; // try again (this time without opencl)
}
Expand Down Expand Up @@ -2725,7 +2727,8 @@ gboolean dt_dev_pixelpipe_process(
if(!claimed)
dt_dev_pixelpipe_cache_report(pipe);

dt_print_pipe(DT_DEBUG_PIPE, "pipe finished", pipe, NULL, old_devid, &roi, &roi, "\n\n");
dt_print_pipe(DT_DEBUG_PIPE, "pipe finished", pipe, NULL, old_devid, &roi, &roi, "ID=%i\n\n",
pipe->image.id);

pipe->processing = FALSE;
return FALSE;
Expand Down Expand Up @@ -2756,7 +2759,8 @@ void dt_dev_pixelpipe_get_dimensions(dt_dev_pixelpipe_t *pipe,
module->modify_roi_out(module, piece, &roi_out, &roi_in);
if((darktable.unmuted & DT_DEBUG_PIPE) && memcmp(&roi_out, &roi_in, sizeof(dt_iop_roi_t)))
dt_print_pipe(DT_DEBUG_PIPE,
"modify roi OUT", piece->pipe, module, DT_DEVICE_NONE, &roi_in, &roi_out, "\n");
"modify roi OUT", piece->pipe, module, DT_DEVICE_NONE, &roi_in, &roi_out, "ID=%i\n",
pipe->image.id);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/iop/channelmixerrgb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,7 @@ static void _set_trouble_messages(struct dt_iop_module_t *self)

dt_print_pipe(DT_DEBUG_ALWAYS, anyproblem ? "chroma trouble" : "chroma data",
NULL, self, DT_DEVICE_NONE, NULL, NULL,
"%s (%i) %s%s%s%sD65=%s. NOW %.3f %.3f %.3f, D65 %.3f %.3f %.3f, AS-SHOT %.3f %.3f %.3f\n",
"%s ID=%i %s%s%s%sD65=%s. NOW %.3f %.3f %.3f, D65 %.3f %.3f %.3f, AS-SHOT %.3f %.3f %.3f\n",
img->filename,
img->id,
anyproblem ? "" : "NO problem, ",
Expand Down

0 comments on commit da98437

Please sign in to comment.