Skip to content

Commit f533362

Browse files
authored
tracing instrument to level trace (#21)
1 parent 951a1fd commit f533362

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

crates/multilinear_extensions/src/virtual_poly.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ pub fn build_eq_x_r_sequential<E: ExtensionField>(r: &[E]) -> ArcMultilinearExte
329329
330330
#[tracing::instrument(
331331
skip_all,
332-
name = "multilinear_extensions::build_eq_x_r_vec_sequential_with_scalar"
332+
name = "multilinear_extensions::build_eq_x_r_vec_sequential_with_scalar",
333+
level = "trace"
333334
)]
334335
pub fn build_eq_x_r_vec_sequential_with_scalar<E: ExtensionField>(r: &[E], scalar: E) -> Vec<E> {
335336
// avoid unnecessary allocation
@@ -354,7 +355,11 @@ pub fn build_eq_x_r_vec_sequential_with_scalar<E: ExtensionField>(r: &[E], scala
354355
}
355356

356357
#[inline]
357-
#[tracing::instrument(skip_all, name = "multilinear_extensions::build_eq_x_r_vec_sequential")]
358+
#[tracing::instrument(
359+
skip_all,
360+
name = "multilinear_extensions::build_eq_x_r_vec_sequential",
361+
level = "trace"
362+
)]
358363
pub fn build_eq_x_r_vec_sequential<E: ExtensionField>(r: &[E]) -> Vec<E> {
359364
build_eq_x_r_vec_sequential_with_scalar(r, E::ONE)
360365
}
@@ -400,7 +405,11 @@ pub fn build_eq_x_r<E: ExtensionField>(r: &[E]) -> ArcMultilinearExtension<'_, E
400405
/// over r, which is
401406
/// eq(x,y) = \prod_i=1^num_var (x_i * r_i + (1-x_i)*(1-r_i))
402407
403-
#[tracing::instrument(skip_all, name = "multilinear_extensions::build_eq_x_r_vec")]
408+
#[tracing::instrument(
409+
skip_all,
410+
name = "multilinear_extensions::build_eq_x_r_vec",
411+
level = "trace"
412+
)]
404413
pub fn build_eq_x_r_vec<E: ExtensionField>(r: &[E]) -> Vec<E> {
405414
// avoid unnecessary allocation
406415
if r.is_empty() {
@@ -444,7 +453,8 @@ pub fn build_eq_x_r_vec<E: ExtensionField>(r: &[E]) -> Vec<E> {
444453

445454
#[tracing::instrument(
446455
skip_all,
447-
name = "multilinear_extensions::build_eq_x_r_vec_with_scalar"
456+
name = "multilinear_extensions::build_eq_x_r_vec_with_scalar",
457+
level = "trace"
448458
)]
449459
pub fn build_eq_x_r_vec_with_scalar<E: ExtensionField>(r: &[E], scalar: E) -> Vec<E> {
450460
// avoid unnecessary allocation

crates/sumcheck/src/prover.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,11 @@ impl<'a, E: ExtensionField> IOPProverState<'a, E> {
304304
/// next round.
305305
///
306306
/// Main algorithm used is from section 3.2 of [XZZPS19](https://eprint.iacr.org/2019/317.pdf#subsection.3.2).
307-
#[tracing::instrument(skip_all, name = "sumcheck::prove_round_and_update_state")]
307+
#[tracing::instrument(
308+
skip_all,
309+
name = "sumcheck::prove_round_and_update_state",
310+
level = "trace"
311+
)]
308312
pub fn prove_round_and_update_state(
309313
&mut self,
310314
challenge: &Option<Challenge<E>>,
@@ -463,7 +467,7 @@ impl<'a, E: ExtensionField> IOPProverState<'a, E> {
463467
#[deprecated(note = "deprecated parallel version due to syncronizaion overhead")]
464468
impl<'a, E: ExtensionField> IOPProverState<'a, E> {
465469
/// Given a virtual polynomial, generate an IOP proof.
466-
#[tracing::instrument(skip_all, name = "sumcheck::prove_parallel")]
470+
#[tracing::instrument(skip_all, name = "sumcheck::prove_parallel", level = "trace")]
467471
pub fn prove_parallel(
468472
poly: VirtualPolynomial<'a, E>,
469473
transcript: &mut impl Transcript<E>,
@@ -555,7 +559,11 @@ impl<'a, E: ExtensionField> IOPProverState<'a, E> {
555559
/// next round.
556560
///
557561
/// Main algorithm used is from section 3.2 of [XZZPS19](https://eprint.iacr.org/2019/317.pdf#subsection.3.2).
558-
#[tracing::instrument(skip_all, name = "sumcheck::prove_round_and_update_state_parallel")]
562+
#[tracing::instrument(
563+
skip_all,
564+
name = "sumcheck::prove_round_and_update_state_parallel",
565+
level = "trace"
566+
)]
559567
pub(crate) fn prove_round_and_update_state_parallel(
560568
&mut self,
561569
challenge: &Option<Challenge<E>>,

0 commit comments

Comments
 (0)