Incorporate tracing crate

This commit is contained in:
bishtpawan 2020-08-05 17:05:53 +05:30
parent e18b56345f
commit fdfbd89946
24 changed files with 24 additions and 24 deletions

View File

@ -11,7 +11,7 @@ doctest = false
[dependencies] [dependencies]
rustc_parse_format = { path = "../librustc_parse_format" } rustc_parse_format = { path = "../librustc_parse_format" }
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_ast_pretty = { path = "../librustc_ast_pretty" }
rustc_attr = { path = "../librustc_attr" } rustc_attr = { path = "../librustc_attr" }
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }

View File

@ -292,7 +292,7 @@ pub fn expand_test_or_bench(
// extern crate test // extern crate test
let test_extern = cx.item(sp, test_id, vec![], ast::ItemKind::ExternCrate(None)); let test_extern = cx.item(sp, test_id, vec![], ast::ItemKind::ExternCrate(None));
log::debug!("synthetic test item:\n{}\n", pprust::item_to_string(&test_const)); tracing::debug!("synthetic test item:\n{}\n", pprust::item_to_string(&test_const));
vec![ vec![
// Access to libtest under a hygienic name // Access to libtest under a hygienic name

View File

@ -1,6 +1,5 @@
// Code that generates a test runner to run all the tests in a crate // Code that generates a test runner to run all the tests in a crate
use log::debug;
use rustc_ast::ast; use rustc_ast::ast;
use rustc_ast::attr; use rustc_ast::attr;
use rustc_ast::entry::{self, EntryPointType}; use rustc_ast::entry::{self, EntryPointType};
@ -16,6 +15,7 @@
use rustc_span::{Span, DUMMY_SP}; use rustc_span::{Span, DUMMY_SP};
use rustc_target::spec::PanicStrategy; use rustc_target::spec::PanicStrategy;
use smallvec::{smallvec, SmallVec}; use smallvec::{smallvec, SmallVec};
use tracing::debug;
use std::{iter, mem}; use std::{iter, mem};

View File

@ -15,7 +15,7 @@ bitflags = "1.0"
flate2 = "1.0" flate2 = "1.0"
libc = "0.2" libc = "0.2"
measureme = "0.7.1" measureme = "0.7.1"
log = { package = "tracing", version = "0.1" } tracing = "0.1"
rustc_middle = { path = "../librustc_middle" } rustc_middle = { path = "../librustc_middle" }
rustc-demangle = "0.1" rustc-demangle = "0.1"
rustc_attr = { path = "../librustc_attr" } rustc_attr = { path = "../librustc_attr" }

View File

@ -19,7 +19,7 @@
use rustc_target::asm::*; use rustc_target::asm::*;
use libc::{c_char, c_uint}; use libc::{c_char, c_uint};
use log::debug; use tracing::debug;
impl AsmBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> { impl AsmBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
fn codegen_llvm_inline_asm( fn codegen_llvm_inline_asm(

View File

@ -4,7 +4,6 @@
use crate::llvm::archive_ro::ArchiveRO; use crate::llvm::archive_ro::ArchiveRO;
use crate::llvm::{self, False, True}; use crate::llvm::{self, False, True};
use crate::{LlvmCodegenBackend, ModuleLlvm}; use crate::{LlvmCodegenBackend, ModuleLlvm};
use log::{debug, info};
use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule, ThinShared}; use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule, ThinShared};
use rustc_codegen_ssa::back::symbol_export; use rustc_codegen_ssa::back::symbol_export;
use rustc_codegen_ssa::back::write::{CodegenContext, FatLTOInput, ModuleConfig}; use rustc_codegen_ssa::back::write::{CodegenContext, FatLTOInput, ModuleConfig};
@ -18,6 +17,7 @@
use rustc_middle::middle::exported_symbols::SymbolExportLevel; use rustc_middle::middle::exported_symbols::SymbolExportLevel;
use rustc_session::cgu_reuse_tracker::CguReuse; use rustc_session::cgu_reuse_tracker::CguReuse;
use rustc_session::config::{self, CrateType, Lto}; use rustc_session::config::{self, CrateType, Lto};
use tracing::{debug, info};
use std::ffi::{CStr, CString}; use std::ffi::{CStr, CString};
use std::fs::File; use std::fs::File;

View File

@ -11,7 +11,6 @@
use crate::type_::Type; use crate::type_::Type;
use crate::LlvmCodegenBackend; use crate::LlvmCodegenBackend;
use crate::ModuleLlvm; use crate::ModuleLlvm;
use log::debug;
use rustc_codegen_ssa::back::write::{BitcodeSection, CodegenContext, EmitObj, ModuleConfig}; use rustc_codegen_ssa::back::write::{BitcodeSection, CodegenContext, EmitObj, ModuleConfig};
use rustc_codegen_ssa::traits::*; use rustc_codegen_ssa::traits::*;
use rustc_codegen_ssa::{CompiledModule, ModuleCodegen}; use rustc_codegen_ssa::{CompiledModule, ModuleCodegen};
@ -26,6 +25,7 @@
use rustc_span::symbol::sym; use rustc_span::symbol::sym;
use rustc_span::InnerSpan; use rustc_span::InnerSpan;
use rustc_target::spec::{CodeModel, RelocModel}; use rustc_target::spec::{CodeModel, RelocModel};
use tracing::debug;
use libc::{c_char, c_int, c_uint, c_void, size_t}; use libc::{c_char, c_int, c_uint, c_void, size_t};
use std::ffi::CString; use std::ffi::CString;

View File

@ -6,7 +6,6 @@
use crate::type_of::LayoutLlvmExt; use crate::type_of::LayoutLlvmExt;
use crate::value::Value; use crate::value::Value;
use libc::{c_char, c_uint}; use libc::{c_char, c_uint};
use log::debug;
use rustc_codegen_ssa::base::to_immediate; use rustc_codegen_ssa::base::to_immediate;
use rustc_codegen_ssa::common::{IntPredicate, RealPredicate, TypeKind}; use rustc_codegen_ssa::common::{IntPredicate, RealPredicate, TypeKind};
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue}; use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
@ -26,6 +25,7 @@
use std::iter::TrustedLen; use std::iter::TrustedLen;
use std::ops::{Deref, Range}; use std::ops::{Deref, Range};
use std::ptr; use std::ptr;
use tracing::debug;
// All Builders must have an llfn associated with them // All Builders must have an llfn associated with them
#[must_use] #[must_use]

View File

@ -9,8 +9,8 @@
use crate::context::CodegenCx; use crate::context::CodegenCx;
use crate::llvm; use crate::llvm;
use crate::value::Value; use crate::value::Value;
use log::debug;
use rustc_codegen_ssa::traits::*; use rustc_codegen_ssa::traits::*;
use tracing::debug;
use rustc_middle::ty::layout::{FnAbiExt, HasTyCtxt}; use rustc_middle::ty::layout::{FnAbiExt, HasTyCtxt};
use rustc_middle::ty::{self, Instance, TypeFoldable}; use rustc_middle::ty::{self, Instance, TypeFoldable};

View File

@ -19,7 +19,7 @@
use rustc_target::abi::{self, AddressSpace, HasDataLayout, LayoutOf, Pointer, Size}; use rustc_target::abi::{self, AddressSpace, HasDataLayout, LayoutOf, Pointer, Size};
use libc::{c_char, c_uint}; use libc::{c_char, c_uint};
use log::debug; use tracing::debug;
/* /*
* A note on nomenclature of linking: "extern", "foreign", and "upcall". * A note on nomenclature of linking: "extern", "foreign", and "upcall".

View File

@ -6,7 +6,6 @@
use crate::type_of::LayoutLlvmExt; use crate::type_of::LayoutLlvmExt;
use crate::value::Value; use crate::value::Value;
use libc::c_uint; use libc::c_uint;
use log::debug;
use rustc_codegen_ssa::traits::*; use rustc_codegen_ssa::traits::*;
use rustc_hir as hir; use rustc_hir as hir;
use rustc_hir::def_id::DefId; use rustc_hir::def_id::DefId;
@ -21,6 +20,7 @@
use rustc_span::symbol::sym; use rustc_span::symbol::sym;
use rustc_span::Span; use rustc_span::Span;
use rustc_target::abi::{AddressSpace, Align, HasDataLayout, LayoutOf, Primitive, Scalar, Size}; use rustc_target::abi::{AddressSpace, Align, HasDataLayout, LayoutOf, Primitive, Scalar, Size};
use tracing::debug;
use std::ffi::CStr; use std::ffi::CStr;

View File

@ -3,11 +3,11 @@
use crate::llvm; use crate::llvm;
use llvm::coverageinfo::CounterMappingRegion; use llvm::coverageinfo::CounterMappingRegion;
use log::debug;
use rustc_codegen_ssa::coverageinfo::map::{Counter, CounterExpression, Region}; use rustc_codegen_ssa::coverageinfo::map::{Counter, CounterExpression, Region};
use rustc_codegen_ssa::traits::{BaseTypeMethods, ConstMethods}; use rustc_codegen_ssa::traits::{BaseTypeMethods, ConstMethods};
use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::fx::FxHashMap;
use rustc_llvm::RustString; use rustc_llvm::RustString;
use tracing::debug;
use std::ffi::CString; use std::ffi::CString;

View File

@ -5,7 +5,6 @@
use libc::c_uint; use libc::c_uint;
use llvm::coverageinfo::CounterMappingRegion; use llvm::coverageinfo::CounterMappingRegion;
use log::debug;
use rustc_codegen_ssa::coverageinfo::map::{CounterExpression, ExprKind, FunctionCoverage}; use rustc_codegen_ssa::coverageinfo::map::{CounterExpression, ExprKind, FunctionCoverage};
use rustc_codegen_ssa::traits::{ use rustc_codegen_ssa::traits::{
BaseTypeMethods, CoverageInfoBuilderMethods, CoverageInfoMethods, StaticMethods, BaseTypeMethods, CoverageInfoBuilderMethods, CoverageInfoMethods, StaticMethods,
@ -13,6 +12,7 @@
use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::fx::FxHashMap;
use rustc_llvm::RustString; use rustc_llvm::RustString;
use rustc_middle::ty::Instance; use rustc_middle::ty::Instance;
use tracing::debug;
use std::cell::RefCell; use std::cell::RefCell;
use std::ffi::CString; use std::ffi::CString;

View File

@ -18,7 +18,6 @@
}; };
use crate::value::Value; use crate::value::Value;
use log::debug;
use rustc_ast::ast; use rustc_ast::ast;
use rustc_codegen_ssa::traits::*; use rustc_codegen_ssa::traits::*;
use rustc_data_structures::const_cstr; use rustc_data_structures::const_cstr;
@ -43,6 +42,7 @@
use rustc_target::abi::{Abi, Align, HasDataLayout, Integer, LayoutOf, TagEncoding}; use rustc_target::abi::{Abi, Align, HasDataLayout, Integer, LayoutOf, TagEncoding};
use rustc_target::abi::{Int, Pointer, F32, F64}; use rustc_target::abi::{Int, Pointer, F32, F64};
use rustc_target::abi::{Primitive, Size, VariantIdx, Variants}; use rustc_target::abi::{Primitive, Size, VariantIdx, Variants};
use tracing::debug;
use libc::{c_longlong, c_uint}; use libc::{c_longlong, c_uint};
use std::collections::hash_map::Entry; use std::collections::hash_map::Entry;

View File

@ -33,9 +33,9 @@
use rustc_target::abi::{LayoutOf, Primitive, Size}; use rustc_target::abi::{LayoutOf, Primitive, Size};
use libc::c_uint; use libc::c_uint;
use log::debug;
use smallvec::SmallVec; use smallvec::SmallVec;
use std::cell::RefCell; use std::cell::RefCell;
use tracing::debug;
mod create_scope_map; mod create_scope_map;
pub mod gdb; pub mod gdb;

View File

@ -18,9 +18,9 @@
use crate::llvm::AttributePlace::Function; use crate::llvm::AttributePlace::Function;
use crate::type_::Type; use crate::type_::Type;
use crate::value::Value; use crate::value::Value;
use log::debug;
use rustc_codegen_ssa::traits::*; use rustc_codegen_ssa::traits::*;
use rustc_middle::ty::Ty; use rustc_middle::ty::Ty;
use tracing::debug;
/// Declare a function. /// Declare a function.
/// ///

View File

@ -7,7 +7,7 @@
use crate::va_arg::emit_va_arg; use crate::va_arg::emit_va_arg;
use crate::value::Value; use crate::value::Value;
use log::debug; use tracing::debug;
use rustc_ast::ast; use rustc_ast::ast;
use rustc_codegen_ssa::base::{compare_simd_types, to_immediate, wants_msvc_seh}; use rustc_codegen_ssa::base::{compare_simd_types, to_immediate, wants_msvc_seh};

View File

@ -4,10 +4,10 @@
use rustc_middle::middle::cstore::MetadataLoader; use rustc_middle::middle::cstore::MetadataLoader;
use rustc_target::spec::Target; use rustc_target::spec::Target;
use log::debug;
use rustc_codegen_ssa::METADATA_FILENAME; use rustc_codegen_ssa::METADATA_FILENAME;
use rustc_data_structures::owning_ref::OwningRef; use rustc_data_structures::owning_ref::OwningRef;
use rustc_data_structures::rustc_erase_owner; use rustc_data_structures::rustc_erase_owner;
use tracing::debug;
use rustc_fs_util::path_to_c_string; use rustc_fs_util::path_to_c_string;
use std::path::Path; use std::path::Path;

View File

@ -4,7 +4,6 @@
use crate::context::CodegenCx; use crate::context::CodegenCx;
use crate::llvm; use crate::llvm;
use crate::type_of::LayoutLlvmExt; use crate::type_of::LayoutLlvmExt;
use log::debug;
use rustc_codegen_ssa::traits::*; use rustc_codegen_ssa::traits::*;
use rustc_hir::def_id::{DefId, LOCAL_CRATE}; use rustc_hir::def_id::{DefId, LOCAL_CRATE};
pub use rustc_middle::mir::mono::MonoItem; pub use rustc_middle::mir::mono::MonoItem;
@ -12,6 +11,7 @@
use rustc_middle::ty::layout::FnAbiExt; use rustc_middle::ty::layout::FnAbiExt;
use rustc_middle::ty::{self, Instance, TypeFoldable}; use rustc_middle::ty::{self, Instance, TypeFoldable};
use rustc_target::abi::LayoutOf; use rustc_target::abi::LayoutOf;
use tracing::debug;
impl PreDefineMethods<'tcx> for CodegenCx<'ll, 'tcx> { impl PreDefineMethods<'tcx> for CodegenCx<'ll, 'tcx> {
fn predefine_static( fn predefine_static(

View File

@ -1,7 +1,6 @@
use crate::abi::FnAbi; use crate::abi::FnAbi;
use crate::common::*; use crate::common::*;
use crate::type_::Type; use crate::type_::Type;
use log::debug;
use rustc_codegen_ssa::traits::*; use rustc_codegen_ssa::traits::*;
use rustc_middle::bug; use rustc_middle::bug;
use rustc_middle::ty::layout::{FnAbiExt, TyAndLayout}; use rustc_middle::ty::layout::{FnAbiExt, TyAndLayout};
@ -10,6 +9,7 @@
use rustc_target::abi::{Abi, AddressSpace, Align, FieldsShape}; use rustc_target::abi::{Abi, AddressSpace, Align, FieldsShape};
use rustc_target::abi::{Int, Pointer, F32, F64}; use rustc_target::abi::{Int, Pointer, F32, F64};
use rustc_target::abi::{LayoutOf, PointeeInfo, Scalar, Size, TyAndLayoutMethods, Variants}; use rustc_target::abi::{LayoutOf, PointeeInfo, Scalar, Size, TyAndLayoutMethods, Variants};
use tracing::debug;
use std::fmt::Write; use std::fmt::Write;

View File

@ -14,7 +14,7 @@ bitflags = "1.2.1"
cc = "1.0.1" cc = "1.0.1"
num_cpus = "1.0" num_cpus = "1.0"
memmap = "0.7" memmap = "0.7"
log = { package = "tracing", version = "0.1" } tracing = "0.1"
libc = "0.2.50" libc = "0.2.50"
jobserver = "0.1.11" jobserver = "0.1.11"
tempfile = "3.1" tempfile = "3.1"

View File

@ -17,7 +17,7 @@
//! have to be implemented by each backends. //! have to be implemented by each backends.
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
#[macro_use] #[macro_use]
extern crate rustc_middle; extern crate rustc_middle;

View File

@ -12,7 +12,7 @@ doctest = false
[dependencies] [dependencies]
ena = "0.14" ena = "0.14"
indexmap = "1" indexmap = "1"
log = { package = "tracing", version = "0.1" } tracing = "0.1"
jobserver_crate = { version = "0.1.13", package = "jobserver" } jobserver_crate = { version = "0.1.13", package = "jobserver" }
lazy_static = "1" lazy_static = "1"
once_cell = { version = "1", features = ["parking_lot"] } once_cell = { version = "1", features = ["parking_lot"] }

View File

@ -26,7 +26,7 @@
#![allow(rustc::default_hash_types)] #![allow(rustc::default_hash_types)]
#[macro_use] #[macro_use]
extern crate log; extern crate tracing;
#[macro_use] #[macro_use]
extern crate cfg_if; extern crate cfg_if;