Mayor Martin J. Walsh made his first public comments Saturday on a planned gun buyback program, calling it “one piece of the puzzle” in a broader effort to tamp down a spike in violence. Officials had hinted at the buyback in early February, following the accidental fatal shooting of a 9-year-old Mattapan boy by his brother; the effort is set to be formally unveiled Monday. Walsh said he was aware of criticism by criminologists and others that buybacks have little effect on crime rates and mostly attract antique firearms. “We’re looking for active guns that potentially are going to cause some serious problems on the street,” Walsh said at a Mattapan press conference. “If it’s really effective, we’re going to keep the program moving. . . . I don’t want to say I’m excited about it. I’d much prefer to be doing a park over, or renovating a school, but unfortunately, we’re where we are today.” The program, called “Piece for Peace,” is the city’s first buyback in eight years, and will start with $100,000 in private funding.