Consider a generic diffusion of the form $$dX_t=f(t,X_t)dt+dB_t,$$ where $f$ is some nice function and $B_t$ is a standard Brownian motion.
The marginal distributions of the integrals $$I:=\int_0^TB_t~dt\qquad J:=\int_0^TX_t~dt$$ can in principle be computed with fairly straightforward methods: $I$ is Gaussian by a classical Riemann sum argument, and $J$ can (again, in principle) be computed by Feynman-Kac.
Question. What about the joint distribution of $(I,J)$?
Are there general techniques that are well adapted to the solution of such problems? I'm also interested in any kind of nontrivial example where such computations have been made.